Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A ton of conflicts on simple UWP project

I have a simple project where I'm getting thousands of errors in, most likely because some UWP/.NET Core dependency issue. The project.json file is very simple:

{
  "dependencies": {
    "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
    "Newtonsoft.Json": "8.0.3"
  },
  "frameworks": {
    "uap10.0": {}
  },
  "runtimes": {
    "win10-arm": {},
    "win10-arm-aot": {},
    "win10-x86": {},
    "win10-x86-aot": {},
    "win10-x64": {},
    "win10-x64-aot": {}
  }
}

These are all the errors I'm getting: http://pastebin.com/WwPKzCgK Example of errors:

Version conflict detected for System.Collections.
 WebServer (≥ 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) -> Microsoft.NETCore.Runtime (≥ 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-arm (≥ 1.0.0) -> System.Collections (= 4.0.10)
 WebServer (≥ 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) -> Microsoft.NETCore (≥ 5.0.0) -> System.Collections (≥ 4.0.10).
Version conflict detected for System.Diagnostics.Debug.
 WebServer (≥ 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) -> Microsoft.NETCore.Runtime (≥ 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-arm (≥ 1.0.0) -> System.Diagnostics.Debug (= 4.0.10)
 WebServer (≥ 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) -> Microsoft.NETCore (≥ 5.0.0) -> System.Diagnostics.Debug (≥ 4.0.10).

How can I resolve the conflicts?

like image 873
Haukman Avatar asked Sep 23 '22 02:09

Haukman


1 Answers

I don't know why I'm only getting this on the Microsoft UWP samples downloaded from GitHub, but to resolve this, I do the following:

  1. Open the Nuget Manager in my project.
  2. Uninstall Microsoft.NETCore.UniversalWindowsPlatform
  3. Search for Microsoft.NETCore.UniversalWindowsPlatform in Nuget, then re-install. Be patient on this par as while I have a decent internet connection, it still takes a bit of time to display the "install" dialog.
  4. Install the Nuget package.

That usually sort out the problem.

Hope this helps.

like image 156
Thierry Avatar answered Oct 27 '22 00:10

Thierry