Crazy compile-time reference for mscorlib in UWP project(s)

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Science we started with .NET Core and UAP (Universal Application Platform) we complained very often about unexpected errors, which we simply couldn’t understand.

One of my favorites is this one:

Microsoft.NETCore.Portable.Compatibility 1.0.0 provides a compile-time reference assembly for mscorlib on UAP,Version=v10.0, but there is no run-time assembly compatible with win10.

This error is compile time error caused by following project.json configuration:

{

  "dependencies": {

 

    "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"

  },

  "frameworks": {

       "uap10.0": { }

  },

  "runtimes": {

   "win10": { },

    "win10-arm": { },

    "win10-arm-aot": { },

    "win10-x86": { },

    "win10-x86-aot": { },

    "win10-x64": { },

    "win10-x64-aot": { }

  }

}

To workaround this problem, You should change configuration as shown below. Please remove “win10” from list of runtimes.

{

  "dependencies": {

 

    "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"

  },

  "frameworks": {

       "uap10.0": { }

  },

  "runtimes": {

   //"win10": { },

    "win10-arm": { },

    "win10-arm-aot": { },

    "win10-x86": { },

    "win10-x86-aot": { },

    "win10-x64": { },

    "win10-x64-aot": { }

  }

}


Posted Feb 04 2016, 07:00 AM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.