One thing awesome at the Visual Studio team is how quick they are to react to issues, even when they are not responsible for the issue itself.
tl;dr: Xamarin was causing the issue, and a fix is available. See below how to install the fix.
Quick recap of the events:
- On January 28th I reported an issue where Visual Studio would freak out when reopening a project. In Windows Phone, you would lose the ability to switch between device and emulators. In Windows Phone and in Windows Store (and maybe other frameworks too), you would get a lot of errors in XAML files (blue underlines). Intellisense would stop showing relevant information. If you had Resharper installed, the same thing was happening in C# files too, with a lot of errors reported. However it was still possible to build the application and to run it. In that blog post I proposed the fix of deleting the SUO file. This file stores some settings, such as the open documents, etc. For some reason, deleting the SUO file was forcing Visual Studio to reset its view and the issue was solved. But it would come back the next time you open the same project, unfortunately.
- A few days later, I was contacted by the Visual Studio team to try and find a solution.
- We sat down (virtually ;) and tried a few things to locate the issue. Actually we had a strong hunch that it was related to Xamarin, as the issues started occurring only after I reinstalled Xamarin on my machine. Our tests showed that indeed, the problem would go away after removing the Xamarin DLLs from the Extensions folder for Visual Studio. And it would come back immediately after restoring the Xamarin DLLs.
- Following that discussion, I asked the Xamarin team, who told me that they were already aware of the issue and had published a fix. Unfortunately the fix is a little bit hidden and doesn’t notify you automatically unless you are working in a Xamarin project at the time.
Installing the fix
The issue is fixed in V1.10 of the Visual Studio add-in for Xamarin. In order to get the update, follow the steps:
- Open Visual Studio
- Open the menu Tools, Options and then find Xamarin.
- In the dialog, click on the Check Now link.
After you install the latest version (which at the time of writing is V1.10), the issue should be solved.
Great thanks to Unni R and John M at Microsoft for the help, as well as Miguel and Dominque at Xamarin.