我正在使用开发REST Web服务器。我需要调用针对 Framework v4.0编译的第三方程序集。 在VS 2017中,我为项目选择 ASP .NET Core Web应用程序(.NET Core 2.1)模板。 我尝试使用Project添加第3方程序集:Add-> Reference ... 但是,我在Project:Assemblies树形视图的程序集上看到黄色警告标志图标。这些属性页程序集全部为空。
I am developing a REST web server using . I need to call 3rd party assemblies that was compiled against framework v4.0. In VS 2017 I choose the "ASP .NET Core Web Application" (.NET Core 2.1) template for my project. I try to add the 3rd party assemblies by using Project: Add->Reference... However I get yellow warning sign icons on the assemblies in the Project:Assemblies tree view.The properties page for these assemblies are all blank.
核心可以调用 4程序集吗?如果这样,如何将它们正确添加到项目中? / p>
Can core call 4 assemblies? If so how do I add them to the project correctly?
推荐答案否。 .NET核心项目无法引用旧版.NET 4.x程序集。因此,需要重建该库以支持.NETCore。
No. .NET core project cannot refer legacy .NET 4.x assemblies. So the library needs to be rebuilt to support .NETCore.
最近,Microsoft发布了.NET Standard来为两个平台构建库,但是程序集仍然不同。它只是被编译成不同的目标。
Recently Microsoft has released .NET Standard to build library for both platforms, however, the assemblies remain different. It's just compiled into different targets.
更多推荐
.net核心可以调用.net 4程序集吗?
发布评论