The .NET Framework and .NET Standard Conflict (Compatibility Issue)

夙愿已清 提交于 2019-12-11 01:49:06

问题


My DLL is created using the .NET Standard 1.6 and ASP.net is using .NET Framework 4+

This is the Error that I am getting

Severity Code Description Project File Line Suppression State Error Project targets '.NETStandard,Version=v1.6'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.5.2'. WebApplication

Is there a work around for this ? Using the old ASP.NET framework instead of the new ASP.NET Core I am not a fan of the Razor syntax, however I would like to use the old aspx syntax to create web forms.

Using : VS - 2017


回答1:


Only .Net Framework 4.6.1 with tooling 2.0 supports .Net Standard 1.6. You will not be able to use DLL targeting .Net Standard 1.6 in application that's targeting .Net Full framework 4+ except 4.6.1 with tooling 2.0. Please refer this link for more details on platform support and compatibility.




回答2:


It's like referencing a 4.5 assembly from a 4.0 project:

To see what .net standard version is implemented by what version of the .net framework, see: https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/



来源:https://stackoverflow.com/questions/43494885/the-net-framework-and-net-standard-conflict-compatibility-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!