1
votes

I've got a Xamarin Forms app that previously worked well on both android and iOS simulator. After updating VSCode and XCode on Mac, I'm not able to launch it again. The app builds well, with no errors, but with a warning that says:

Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Xamarin.iOS". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (MSB3245)

Nevertheless, it compiles, but when I launch the app on debug (or release) mode, it launches the iOS simulator, and then I can see the pause and stop buttons on VSCode as it was running, but the app is not installed in the iOS simulator and I see no changes on the simulator, just the main screen of iOS.

No breakpoints are active and, if in Windows I connect Visual Studio 2017 to a MAC virtual machine, I can launch the app, but it's pretty slow, so I need it to work on the MAC VM.

I've also tried to reinstall XCode and to reset settings on iOS simulator with no luck.

Any thoughs on what could be causing this problem?

2

2 Answers

0
votes

First, make sure that all the tool versions are up to date. If the problem persists, you can delete two folders of bin and obj under the iOS project. They retain the old version of compilation information. Once the deletion is complete, you can rebuild your project.

0
votes

I've solved it. It seems that visual studio didn't have permission to open the default projects folder (I don't know why this changed when I updated it). I've changed the default folder to another path, in my case, Downloads folder, and now the problem has gone. Pretty strange though.