Reference a .Net 4.6.2 project in a .NetCore project (VS2017 15.4.4)

后端 未结 2 982
余生分开走
余生分开走 2020-12-22 13:37

I have a .Net core 2.0 project which needs to reference a .Net 4.6.2 projets (BLL and Entities on the picture) in the same solution on Visual Studio 2017 (v 15.4.4). I saw t

相关标签:
2条回答
  • As user magicandre1981 said, you should downgrade from .NET Framework version 4.6.2 to 4.6.1.

    Taking a look at the .NET Standard version table, you can see that version 4.6.1 is supported by .NET Standard 2.0 (and thus .NET Core 2.0), but 4.6.2 is not listed (therefore not supported).

    For those unable to click through, I took the following screen shot of the table presented on the above linked page:

    (image is correct as on Nov 17, 2017)

    I'd also recommend taking a look through the documentation for the .NET Standard or at the videos that Immo Landwerth (who is the PM in charge of .NET Standard) has put out about it.

    0 讨论(0)
  • 2020-12-22 14:34

    I got two problems:

    1. As said @Jamie Taylor, I needed to downgrade to .NET Framework 4.6.1 to be compatible with .NET core 2.0.
    2. Because of downgrading, some Nuget packages where conflicting with the .NET Framework version 4.6.1. It was the case of EF 6.2 (which uses .NET Framework 4.6.2). So I downgraded all needed packages then deleted "packages", "bin" and "obj" folders and did a Nuget Restore.
    0 讨论(0)
提交回复
热议问题