很抱歉问这个问题,我一定错过了一些东西,或者做了一些完全错误的事情。
我刚刚创建了一个引用 .NET Framework 4.8 程序集的 .NET Core 3.1 控制台应用程序。控制台应用程序调用引用的程序集中的一些方法。我的问题是:为什么它能编译并运行?
最佳答案
由于 .NET Framework 兼容模式,这才有效
Starting with .NET Standard 2.0, the .NET Framework compatibility mode was introduced. This compatibility mode allows .NET Standard and .NET Core projects to reference .NET Framework libraries. Referencing .NET Framework libraries doesn't work for all projects, such as if the library uses Windows Presentation Foundation (WPF) APIs, but it does unblock many porting scenarios.
关于.NET Core 控制台应用程序引用 .NET Framework 程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66354826/