You must add a reference to assembly mscorlib, version=4.0.0

前端 未结 4 653
执笔经年
执笔经年 2020-12-13 17:03

I\'m having some trouble migrating a web project from RC1 to RC2. When I switched, I\'m getting a bunch of these errors throughout the project.

The ty

相关标签:
4条回答
  • 2020-12-13 17:44

    I had the same issue and adding the following package to my project.json dependencies fixed it for me:

    "Microsoft.NETCore.Portable.Compatibility": "1.0.1-rc2-24027",
    

    This package enables compatibility with mscorlib-based PCLs.

    0 讨论(0)
  • 2020-12-13 17:44

    In fact, the problem is an old lib that requires an asp.net 4.0 or 4.5 vesion (less than Core).

    Microsoft provides a solution for it by installing the fallowing NuGet package.

    Microsoft.NETCore.Portable.Compatibility

    this way you will be able to run your code with old libs.

    0 讨论(0)
  • 2020-12-13 17:49

    I don't have the rep to comment but Matt Kemp's post lead to my solution . In my case it was using a Class Library(.Net Standard) instead of Android Class Library (Xamarin)

    0 讨论(0)
  • 2020-12-13 17:53

    I got this error when I created a new project using the template Class Library (.NET Standard) and ported some code into it that I wanted to re-use.

    I created a new project Class Library (.NET Framework) and moved the code there instead and it worked without any issues.

    0 讨论(0)
提交回复
热议问题