可以在ASP.NET Core Application中安装基于.NET标准版本的NuGet包吗? [英] Its possible to install NuGet packages based on .NET standard version in ASP.NET Core Application?

查看:40
本文介绍了可以在ASP.NET Core Application中安装基于.NET标准版本的NuGet包吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



├──lib

  ├──.netstandard1.2  
     ├──组装。 dll


  ├──.netstandard1.4

        ├──AssembliesCore.dll



我在ASP.NET核心应用程序中安装了上面的NuGet包。在Project中,请参阅
AssembliesCore.dll 表单  .netstandard1.4 文件夹。



每当安装时ASP.NET核心应用程序中的NuGet包,.Net标准最高的一个。



可以参考 
Assemblies.dll   form  .netstandard1.2  文件夹? 



  ;



< span style ="border:0px; font-weight:inherit; font-style:inherit; font-family:Arial,sans-serif; margin:0px; outline:0px; padding:0px">

  ├── .netstandard1.4
        ├── AssembliesCore.dll

I have installed above NuGet package in ASP.NET Core Application. In Project refer AssembliesCore.dll form .netstandard1.4 folder.

Whenever install NuGet packages in ASP.NET Core application, .Net standard taken highest one.

Its possible to refer 
Assemblies.dll form .netstandard1.2 folder? 

 


推荐答案

嗨Dheeps,

Hi Dheeps,

根据.NET平台支持,.NET Core有版本1.0和版本2.0,版本1.0对应.NET Standard 1.0到1.6,版本2.0对应.NET Standard 2.0。

According to the .NET platform support, .NET Core has version 1.0 and version 2.0 and the version 1.0 corresponding .NET Standard 1.0 to 1.6, the version 2.0 corresponding .NET Standard 2.0.

我测试.NET Core 1.0应用程序,我发现无论哪个版本的.NET Standard版本(属于1.0到1.6),它总是安装最高版本。除非你创建一个.NET Core 2.0应用程序,它将安装.NET Standard 2.0软件包。

I test the .NET Core 1.0 application, I found that no matter which version of .NET Standard version (belongs 1.0 to 1.6), it always install the highest version. Unless you create a .NET Core 2.0 application, it will install the .NET Standard 2.0 package.

根据测试结果,应该在nuget软件包中安装最高版本的程序集。所以我担心你不能参考Assemblies .dll来自.netstandard1.2文件夹,当你的情况存在.netstandard 1.4时。

According to the test result, it should be install the highest version of assembly in nuget package. So I'm afraid that you could not refere Assemblies.dll from .netstandard1.2 folder when .netstandard 1.4 existing in your situation.

最好的问候,

Weiwei

Best Regards,
Weiwei


这篇关于可以在ASP.NET Core Application中安装基于.NET标准版本的NuGet包吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆