【发布时间】:2017-11-20 07:21:12
【问题描述】:
我有 2 个库:
- 第一个库(
First.csproj) - netstandard1.3 - 第二个库(
Second.csproj) - .Net framework 4.6.1
Second.csproj 具有对First.csproj 的项目引用。
编译成 VS2017 工作没有问题。
之后我想为 Second.csproj 创建 nuget 包,依赖于 First.csproj,但是命令
nuget pack Second.csproj -IncludeReferencedProjects
因错误而失败
Error occurred when processing file 'E:\blabla\First.csproj': Unable to find 'bin\Release\First\bin\Release\'. Make sure the project has been built.
Unable to find 'bin\Release\First\bin\Release\'. Make sure the project has been built.
我的 nuget 版本是最新的:NuGet 版本:4.4.1.4656
如何正确打包我的 .NET Framework 4.6.1 项目并添加对 netstandard 库的依赖项?
【问题讨论】:
-
如果您希望第一个项目作为依赖项,它需要有一个与项目同名的 .nuspec 文件。
-
我有。它在 First.csproj 是 Net 4.6.1 项目时工作。但是将项目类型更改为 netstandard1.3 后它不起作用。