Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package Installation Error Microsoft.NetCore.UniversalWindowsPlatform.5.0.0

I just did a fresh install of visual studio community edition. When I start a new project and choose 'Blank App (Universal Windows)' I get this error during project creation:

Package Installation Error Could not add all required packages to the project. The following packages failed to install from 'C:\Program Files (x86)\Microsoft SDKs\NETCoreSDK': Microsoft.NetCore.UniversalWindowsPlatform.5.0.0: Package restore failed. Rolling back package changes for 'AppTest'

Any ideas what the cause of this error can be?

I installed all the Universal Windows App Development Tools: - Tools (1.3.2) and Windows 10 SDK (10.0.10586) - Emulators for Windows 10 Mobile (10.0.10586) - Windows 10 SDK (10.0.10240).

What am i missing. How can I solve this issue?

like image 251
Stefan H Avatar asked May 23 '16 14:05

Stefan H


4 Answers

Sometimes nuget fails to install the UniversalWindowsPlatform package. Search for "Microsoft.NETCore.UniversalWindowsPlatform" nuget package and install it.

like image 166
Ateik Avatar answered Nov 16 '22 03:11

Ateik


So after much back and forth between myself and an MS rep on their forums I did actually manage to resolve this. The forum link is here

I did actually need to reset my VS installation to try and get a clean install. Then the actual error reared its head. In my case it was Nuget caching corrupt packages (these are not cleaned by a VS reinstall).

The link that helped me resolve it in the end can be found here on Stack Overflow

like image 43
BGTurner Avatar answered Nov 16 '22 03:11

BGTurner


I had the same probem after a clean install of OS/Updates/VS 2015 Update 3 + Xamarin update. I created a Universal 'Blank XAML App (Xamarin Forms Portable)' During creation I received same error.

In the Nuget Package Manager Console pick AppX.UWP, then run:

Install-Package Microsoft.NETCore.UniversalWindowsPlatform 

Restart VS and create a new project, error does not come back.

like image 3
jlo-gmail Avatar answered Nov 16 '22 03:11

jlo-gmail


What helped me was to update the UniversalWindowsPlatform package in nuget to 5.1.0. Then all went smoothly the next time I created UWP project.

like image 1
Petr Avatar answered Nov 16 '22 04:11

Petr