Empty UAP project fails to build: System.Runtime

I’m trying to update one of my games in the Windows Phone store - I needed to add ratings to it to stop it being taken down, but when I resubmitted it, it failed certification due to startup issues.

I think I know what this so am trying to resolve it. The game was built for WP7 using XNA, so I have to port it to MonoGame to be able to release it. I’ve ported similar vintage code before without problems but I’ve run into a wall this time.

It seems there is something wrong with the current development build of the MonoGame installer. I had problems back in April with this too which I gave up on resolving. Yesterday I downloaded a new copy of the installer, ran it, created an empty MonoGame Windows 10 UAP project, and tried to build it.

1>------ Build started: Project: Gravicon, Configuration: Debug x86 ------
1>C:\GameDev\Win10\Gravicon\Gravicon\Gravicon.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file ‘System.Runtime.dll’
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(264,5): Xaml Internal Error error WMC9999: Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Here’s what I get from “Copy Info” in Help About

Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Community

Visual Basic 2015 00322-20000-00000-AA049
Microsoft Visual Basic 2015

Visual C# 2015 00322-20000-00000-AA049
Microsoft Visual C# 2015

Visual C++ 2015 00322-20000-00000-AA049
Microsoft Visual C++ 2015

Visual F# 2015 00322-20000-00000-AA049
Microsoft Visual F# 2015

Application Insights Tools for Visual Studio Package 5.209.60613.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1) 14.1.11120.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.7.1 14.0.11112.0
Azure App Service Tools v2.7.1

Common Azure Tools 1.7
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio 1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JetBrains ReSharper Ultimate 10.0.1 Build 104.0.20151114.160203
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager 3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 14.0.60311.1
Microsoft SQL Server Data Tools

TypeScript 1.8.31.0
TypeScript tools for Visual Studio

Visual Studio Tools for Unity 2.2.0.0
Visual Studio Tools for Unity

Visual Studio Tools for Universal Windows Apps 14.0.25219.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin 4.0.3.214 (0dd817c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 6.0.3.5 (a94a03b)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS 9.6.1.8 (3a25bf1)
Visual Studio extension to enable development for Xamarin.iOS.

Hello Paul,

Have you tried reinstalling the NuGet packages?

Tools -> NuGet Package Manager -> Package Manager Console
Once the console has initialized run the command
Update-Package -Reinstall

For me, this reinstalled “'Microsoft.NETCore.UniversalWindowsPlatform 5.0.0”.

and then try to run your game again. Does this help?

I do all my gamedev offline.

Trying this again from home with NuGet “Auto check for missing packages” turned on… Bang, it downloads stuff and the project builds just fine. It’s lovely when the magic happens :wink: