NuGet:pack命令不包括nuget依赖项 [英] NuGet: pack command is NOT including nuget dependencies

查看:646
本文介绍了NuGet:pack命令不包括nuget依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下设置:




  • nuget.exe版本:1.6.21205.9031

  • 项目A.csproj打包成A.1.0.0.0.nupkg,并发布到本地IIS托管的LOCAL包存储库(My VS Nuget Extension我可以将A包添加到新项目中)

  • 项目B.csproj依赖于我添加的VS Nuget扩展的A包。



现在,当我运行

  nuget规格

创建B.nuspec。



然后我运行

  nuget pack B.csproj -verbose 

但是在创建的B包中,它们对A包没有依赖性。 nuget pack命令告诉我,它已经找到了package.config文件(其中包含对A包的依赖),但是后来它表示Dependencies:None。



我错过了什么?问题是A包只能在我的本地包存储库中找到?如何使nuget.exe知道本地存储库?



非常感谢!

解决方案需要找到文件夹以解决依赖关系( nuget pack 请参阅 http://nuget.codeplex.com/workitem/3097 ),与.csproj(只要有一个 .sln 文件在其上一级)或在 NuGet.Config 中指定的文件夹中。


i have the following setting:

  • nuget.exe Version: 1.6.21205.9031
  • Project A.csproj packaged into A.1.0.0.0.nupkg, and published to a LOCAL package repository hosted on my local IIS (My VS Nuget Extension i able to add the A-package to a new project)
  • Project B.csproj has a dependency to the A-package that i added with the VS Nuget Extension

Now, when i run

nuget spec

the B.nuspec is created.

Then i run

nuget pack B.csproj -verbose

but in the created B-package, their is NO dependency to the A-package. The nuget pack command tells me that it has found the packages.config file (which contains the dependency to the A-package), but then it says "Dependencies: None".

What am i missing? Could the problem be that the A-package can only be found in my local package repository? How can i make nuget.exe aware of this local repository?

Thanks a lot!

解决方案

nuget pack needs to be able to find the packages folder in order to resolve dependencies (see http://nuget.codeplex.com/workitem/3097), either in the same folder as the .csproj (as long as there's a .sln file one level above it) or in a folder specified in NuGet.Config.

这篇关于NuGet:pack命令不包括nuget依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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