Article

I was recently playing around with Azure Mobile Apps and Xamarin.Forms and ran into an issue with the Quickstart project you can download from the Azure Portal. After I opened the solution in Visual Studio 2017 RC I was seeing many errors such as “Predefined type ‘System.Void’ is not defined or imported” and “The type ‘Attribute’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’.” when trying to compile the Droid project.

The Fix

As the second error message suggests, there’s quite an easy fix for this, and that’s to edit the Droid project and add the reference to mscorlib by adding <Reference Include=”mscorlib” /> as shown below. When you reload the project, you should find you’re able to compile the project again.

....
<ItemGroup>
    <Reference Include="mscorlib" />
    <Reference Include="FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
....

Leave a Reply