[英]Is it possible to use the .Net Framework 4.5 Dll reference in .Net Core Console App that will run in Linux
I have a DLL(Say FileWrapper.dll) that is build using .Net Framework 4.5 (Build for linux) 我有一个使用.Net Framework 4.5(适用于Linux的版本)构建的DLL(Say FileWrapper.dll)
Is it possible to build a console application (in .Net Core 2.2 - For Linux) that has references FileWrapper.dll and use various functions within in FileWrapper.dll. 是否可以构建引用FileWrapper.dll的控制台应用程序(在.Net Core 2.2中-对于Linux),并在FileWrapper.dll中使用各种功能。
Any pointers or past experience is helpful. 任何指示或过去的经验都是有帮助的。
Building .net core 2.2 console app for Linux using dll build in .Net Framework 4.5 使用.Net Framework 4.5中的dll构建适用于Linux的.net Core 2.2控制台应用程序
No Code specific 没有特定的代码
Hoping to build .net core console app that uses a dll build in .net framework 4.5 希望构建使用.net Framework 4.5中的dll构建的.net核心控制台应用程序
Yes, this is possible and was introduced with the .NET standard 2.0 which is supported by .Net Core 2 and .Net Framework 4.6.1. 是的,这是可行的,并由.Net Core 2和.Net Framework 4.6.1支持的.NET标准2.0引入。 The concept is described is called a "compatibility shim" in .Net Standard 2.0.
该概念在.Net Standard 2.0中被称为“兼容性填充程序”。 Here are a couple of links to get you started
这里有几个链接可以帮助您入门
Building a Compatibility Shim with .Net Standard 2.0 与.Net Standard 2.0建立相容性Shim
stack overflow - Compatibility shim used by .Net Standard 2.0 堆栈溢出-.Net Standard 2.0使用的兼容性填充程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.