.net核心可以调用.net 4程序集吗?

编程入门 行业动态 更新时间:2024-10-25 19:23:07
本文介绍了核心可以调用 4程序集吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用开发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程序集吗?

本文发布于:2023-11-09 10:10:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572095.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:核心   程序   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!