.NET Core project add reference to .NET Framework project. Why it's possible?

前端 未结 2 918
醉梦人生
醉梦人生 2021-02-12 23:31

I have followings projects:

.NET Core 2.0 Web Application

.NET Standard 2.0 Class library &

.NET Framework 4.5 Class Library.

I add referenc

相关标签:
2条回答
  • 2021-02-13 00:12

    I do not know what made Microsoft allow referencing .net framework class library into .net core project but as a programmer, I am happy with this allowance.

    You see allowing .net core application to reference .net framework libraries is useful in case you want to start with windows and are planning to go cross platform in the future.

    We are in a stage where many useful open source libraries do not fully support .net core till the date of this post, masstransit is an example, so when I am developing a new software I will be using .net core project that depends on such libraries and I will update them later when they support .net core.

    0 讨论(0)
  • 2021-02-13 00:19

    This was just added as part of .NET Standard/Core 2.0. As long as the .NET Framework dll only references things in the .NET Standard, it will use type forwarding to the .NET Core implementations.

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