Bug 35517 - System.Runtime is missing error
Summary: System.Runtime is missing error
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-11-04 00:57 UTC by Brent Arias
Modified: 2016-05-18 15:57 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Brent Arias 2015-11-04 00:57:57 UTC
A brand-new, blank Xamarin Forms project created by Visual Studio will not build due to errors coming from the Android project it contains.

I did not specify a version of the Visual Studio Extensions from the Bugzilla dropdown, because I have no idea how to locate the version.  However, my setup is as follows:

 * I am running Windows 10 Pro
 * I am using Visual Studio 2015 
 * VS claims to have the "Get Xamarin" tools installed.
 * I have installed Xamarin Studio version 5.9.7. 
 * There is a "Xamarin" extension (version 3.0?), listed under "tools", in the Visual Studio gallery that is *NOT* installed.  Visual Studio is not recommending any Xamarin updates to me...so I don't know what this particular extension is for. 

I filed this bug as a VS extension bug, because the same blank solution builds successfully in Xamarin Studio.

Steps to reproduce:

1) In Visual Studio 2015 create a brand-new Xamarin Forms project by using the VS templates listed under "Mobile Apps".  Specifically, choose to create "Blank App (Xamarin Forms Shared)" with NET framework 4.6.  Visual Studio creates the new solution and projects from the template.  
2) Request the blank solution to build.

As a result of step 2, about a dozen errors will emerge that all say "System.Runtime" is missing.  All the errors are associated with the Android project.  Here is one sample:

Error	CS0012	The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.	BlankBuild.Droid	c:\users\costcopc\documents\visual studio 2015\Projects\BlankBuild\BlankBuild\BlankBuild\App.cs	19

This bug is almost the same as 27469.  Just like defect 27469, I can work around this defect by manually adding a reference to System.Runtime shown here:

> C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll

Unlike bug 27469, this problem does not require adding reference to PCL libraries.
Comment 1 Jose Gallardo 2016-05-18 15:57:46 UTC
This issue should be already fixed on current Beta (XVS 4.1.x) builds.
I'm marking it as resolved, but please feel free to reopen it if needed.