5

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?

1
  • I attempted to delete all cached packages from %userprofile%\.nuget\packages in case they were corrupt, but that didn't do anything, the missing ones were re-downloaded and the errors stayed
    – Haukman
    Mar 15, 2016 at 4:26

1 Answer 1

4

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.

8
  • Thanks for the suggestion. I tried that, plus I added all referenced assemblies in the list of conflicts to the project.json, that got rid of the conflict errors, but I still can't compile (1000s of errors). Note that this isn't one of the GitHub MSFT samples. If I create a new UWP app then it works fine, same references.
    – Haukman
    Mar 15, 2016 at 5:04
  • That's odd! Anyway, I've just tried to open a sample from MS thinking I would get the problem and I first got a startup error so I closed all my copies of visual studio and tried again and surprisingly it worked and I did get the errors I use to get. It got me thinking and while trying to resolve another problem (ntdll.dll error in Release Mode), I re-installed the Windows 10 SDK from dev.windows.com/en-US/downloads/windows-10-sdk - Try this, may be it will help. I thought my machine was fully up-to-date but it must have somehow fixed other issues on my machine.
    – Thierry
    Mar 15, 2016 at 5:27
  • Tried to download that, said it was already installed. Plus the fact that a brand new project works leaves me to believe there's something odd with this project, but it worked yesterday and there's not that much in the folder... annoying.
    – Haukman
    Mar 15, 2016 at 6:01
  • Shame it didn't work. I just had a look at your pastebin.com post, and I'm wondering if you could disable Nuget automatic download packages and take a note of all the Nuget packages via the 'Manage Nuget' you have and then uninstall all, then just re-install Microsoft.NetCore.UniversalPlatform. Make sure to search for that specific one to make sure it is definitely the correct one. One last thing I can think of is, have you check the Targeting in the Application under the project properties? What are they set to? Mine are set to 10.0.10586 and min is set to 10.0.10240.
    – Thierry
    Mar 15, 2016 at 11:10
  • I can workaround the nuget errors by manually adding the conflicting frameworks, but that didn't do anything for the build errors. The target is set to 10586, with min set to 10240.
    – Haukman
    Mar 16, 2016 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.