Solved: Unable to Run Windows (UWP) Application from Visual Studio 2019

Over the last 24hrs I’ve had to setup a new dev machine from scratch. After installing all the bits and pieces I need to test out to make sure I can build and deploy apps to Android, iOS and Windows. After creating a new Xamarin.Forms application I set the UWP head project to be the … Continue reading “Solved: Unable to Run Windows (UWP) Application from Visual Studio 2019”

Over the last 24hrs I’ve had to setup a new dev machine from scratch. After installing all the bits and pieces I need to test out to make sure I can build and deploy apps to Android, iOS and Windows. After creating a new Xamarin.Forms application I set the UWP head project to be the startup project and hit run….. and waited….. and waited….. and waited.

After seemingly forever there was an error that appeared in the bottom status bar. Not in the Output window, and actually the build was still going. It reads “Failed to download package ‘runtime.win10-x64.Microsoft.Net.Native.SharedLibrary.2.1.8’ from ‘https://api.nuget.org/v3-flatcontainer/runtime.win10-x64.microsoft.net.native.sharedlibrary/2.1.8/runtime…..”

I’m sure that there are going to be readers out there that will answer this by saying – download nuget and run a manual restore; or call dotnet restore from the package manager. But seriously??? why am I having to do this??? Why it Visual Studio so broken that I can just run the UWP head project of a new Xamarin.Forms application.

I went into manage nuget packages and upgraded the Microsoft.NETCore.UniversalWindowsPlatform package.

After a 20minute wait, it eventually upgraded the package. There after I was able to build and run my UWP application.

Ironically I complained about this back in August last year (the previous time I had to setup a replacement device).

Amazing that in all that time, Microsoft can’t work out how to make new installed, new project, run…. just work, like it should.