Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use debugger for xamarin android project: System.IO.FileNotFoundException: Could not load file or assembly Mono.Posix

After upgrading my visual studio 2017 to 15.2v (26430.12)

Xamarin.Android SDK 7.3.1.2 (9dbc4c5)

Can't use the debugger anymore. The project builds successfully and deployment finishes but then this error happens:

Could not load file or assembly Mono.Posix

Full error message:

enter image description here

like image 683
ctyar Avatar asked Jun 05 '17 08:06

ctyar


2 Answers

This is a Known Issue. The root cause is lacking of Mono.Posix.dll file under C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Xamarin.VisualStudio\.

So, to fix the problem, you can download the dll file from attached file and copy it to the up mentioned location.

like image 68
Elvis Xia - MSFT Avatar answered Sep 23 '22 22:09

Elvis Xia - MSFT


Elvis' answer is correct. However in addition to copying the file Mono.Posix.dll to the correct location, you also need to unblock the file by right clicking on the file, selecting properties and checking the unblock box. After that you need to restart Visual Studio.

like image 22
bmacadam Avatar answered Sep 20 '22 22:09

bmacadam