This issue was not unlike others that I have come up against with my cross-device mobile development efforts.
- February 12, 2017
Another day, another issue while building a Xamarin project. In this case, I was building a project from Xamarin and working through some logic. When building the Android project I was presented with the following build errors. I am getting use to different errors at the most unexpected times. This issue was not unlike others that I have come up against with my cross-device mobile development efforts. The good news, after much hunting and packing I found the solution. See below.
The solution (to make a very long story short) was to unload the project from Visual Studio. Open the csproj and add the following reference (in bold). I initially was comparing some of my working Android projects with this one that just would not build.
I noticed the reference to mscorlib. I tried to add a reference to this dll directly through ‘Add Reference’ but I got the following error "mscorlib.dll" component is already automatically referenced. The build system should add this reference for you. Since I could not add through the VS.NET interface, i chose to add via csproj file. After reloading the project and rebuilding the reference to mscorlib was visible in the list of references and finally my project built fine.