[英]Possibility to reference "traditional" (old) .net libraries from .net core applications
There are a bit confusing information about the backward referencing possibility from .net core applications (eg ASP.Net Core) to the commonly used .net framework libraries.关于从 .net 核心应用程序(例如 ASP.Net 核心)到常用 .net 框架库的向后引用可能性的信息有点令人困惑。 I got the following impression now:
我现在有以下印象:
Does this sound correct?这听起来正确吗?
PS I was thinking that perhaps in case 1 decompiling to IL and recompiling back as "netcoreapp1.0" or "netstandard1.6" or some other voodoo can help? PS 我在想,如果 1 反编译为 IL 并重新编译为“netcoreapp1.0”或“netstandard1.6”或其他一些伏都教可能会有所帮助?
PPS As mentioned in comments it's possible to reference ordinary class library project that can in turn reference the library, but that will mean you have to wrap everything that is in the library, so depends a lot if this can be used. PPS 正如评论中提到的,可以引用普通的类库项目,然后可以引用该库,但这意味着您必须包装库中的所有内容,因此是否可以使用这在很大程度上取决于。
For the moment this is not possible.目前这是不可能的。
You have 3 options:您有 3 个选择:
EDIT on 20-03-2017 : Just came across this post : It seems now possible to have your .NET Core app target .NET 4.6 by changing the .csproj, UNTESTED (yet) 2017 年 3 月 20 日编辑:刚刚看到这篇文章:现在似乎可以通过更改 .csproj 来让您的 .NET Core 应用程序面向 .NET 4.6,但尚未测试
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
to到
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>
then dotnet restore
followed by dotnet run
然后
dotnet restore
然后是dotnet run
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.