我已经参考了.Net框架 ddl to .Net标准2.0。它会向我显示以下错误。
System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.'
相同的 ddl 在 .Net 框架项目上运行良好但对于 .Net 标准,它将显示错误。
“.Net Framework dll 无法在 .Net Standard 项目上运行” - 嗯,是的;这是正常现象,也是意料之中的;如果你需要吃一些东西仅适用于 .NET Framework(不是 .NET Standard),那么:您应该只从本身面向 .NET Framework 的项目中使用它;或者:考虑重新定位或多定位您正在使用的库(如果您控制它;否则:询问供应商),理想情况下,它可以作为针对 .NET Standard 或多目标的 nupkg 提供.NET框架and.NET 标准。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)