为什么dotnet5.1软件包不兼容传统的.NET PCL?

时间:2016-04-18 23:34:03

标签: c# .net nuget asp.net5

我正在尝试使用来自我的可移植类库dotnet5.1的程序包,该程序库面向以下平台(Profile 259):

  • .NET Framework 4.5
  • Windows 8.0
  • Windows Phone 8.1
  • Windows Phone Silverlight 8.0

根据解释使用dotnet5.x标记符的动机/好处的this文档,它说.NET代可以与现有的PCL互操作。它还lists每个PCL配置文件应该与哪个生成器进行比较,其中一个是配置文件259 PCL,它们映射到dotnet5.1名字对象。

那么为什么呢,当我尝试在我的干净的Profile 259 PCL中安装dotnet5.1库时,我在Visual Studio中遇到了这个错误:

PM> Install-Package Enumerator
...
Install-Package : Could not install package 'Enumerator 1.13.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not 
contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

有.NET Core经验的人可以向我解释为什么会这样吗?这是NuGet中的错误吗?如果dotnet5.x包不能与现有的PCL一起使用,那么它们实际用于什么目的?

感谢您的帮助。

编辑:应该注意的是,dotnet5.x标记基本上等同于较新的netstandard1.y标记(其中y == x - 1)。有关详细信息,请参阅文档的最新版本here

0 个答案:

没有答案