Use .net core DLL in Framework 4.6 project

≡放荡痞女 提交于 2020-01-03 08:58:09

问题


I have built a DLL in .net core 2.0 and I now want to use it in a WinForms-project using the .net 4.6.1-framework.

I can reference the dll but I get a "System.IO.FileLoadException" which says that "System.Runtime, Version 4.2.0.0" could not be found.

What's the standard way to integrate a .net core 2.0-DLL in a full-framework-project?


回答1:


According to MSDN you should reference .Net Standard and to reference .Net Standard 2.0 library you should have a project on .Net Framework 4.6.1 or higher and installed .Net Core 2.0 SDK.

You should change target framework to 4.6.1 of your WinForms project and install .Net Core SDK.



来源:https://stackoverflow.com/questions/46109469/use-net-core-dll-in-framework-4-6-project

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