【发布时间】:2014-04-13 01:38:57
【问题描述】:
我正在尝试构建一个安装可移植类库的 nuget 包,该类库本身依赖于可移植类库的集合。我可以创建包并毫无问题地安装它,但是当我运行安装了新包的应用程序时,.NET 4.5。类库测试项目,总是报如下异常:
threw exception:
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.Data.Services.Client.Portable, Version=5.6.1.0, Culture=neutral, ...
我的 nuspec 文件,包含以下依赖项部分。
<dependencies>
<group targetFramework="portable-net45+wp80+win">
<dependency id="Microsoft.Bcl" version="1.1.6" />
<dependency id="Newtonsoft.Json" version="6.0.2" />
<dependency id="Microsoft.Data.Services.Client" version="5.6.1" />
<dependency id="Microsoft.AspNet.WebApi.Client" version="5.1.1" />
</group>
</dependencies>
我过去创建了许多 nuget 包,但从未遇到过这个问题。我猜这与引用我正在创建的 PCL dll 中每个库的 PCL 版本有关,但我不知道如何让这个 nuget 正常工作。
我错过了什么?
【问题讨论】:
标签: nuget nuget-package portable-class-library