MSBuild NuGet.targets,Nuget.exe:无法从路径'blah.nupkg'错误读取软件包 [英] MSBuild NuGet.targets ,Nuget.exe : Unable to read package from path 'blah.nupkg' error

查看:121
本文介绍了MSBuild NuGet.targets,Nuget.exe:无法从路径'blah.nupkg'错误读取软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行在TeamCity中构建Web项目的MSBuild构建步骤时遇到这些错误,并且我已设置 Nuget目标文件PackageSource指向本地Nuget服务器 例如PackageSource Include ="http://mylocaldevurl/nuget/Packages".

I am getting these errors when running a MSBuild build step that builds a web project in TeamCity and I have setup my Nuget targets file PackageSource to point to a local Nuget server e.g. PackageSource Include="http://mylocaldevurl/nuget/Packages" .

该版本运行并产生以下形式的错误 例如执行[F:\ TeamCity \ buildAgent \ work \ blahblah.nuget \ NuGet.targets(87,9):无法从路径'Lucene.Net.3.0.3.nupkg'中读取软件包.

The build runs and produces errors of the form e.g. Exec] F:\TeamCity\buildAgent\work\blahblah.nuget\NuGet.targets(87, 9): Unable to read package from path 'Lucene.Net.3.0.3.nupkg'.

奇怪的是,其他软件包也可以很好地下载到TeamCity工作文件夹- package文件夹.

Whats is strange other packages are downloaded fine to the TeamCity working folder -the package folder.

本地Nuget服务器仅包含.nupkg文件,其中包含我的VS解决方案程序包的副本(默认包文件夹中的副本).

The local Nuget Server contains copies of my VS solution packages(the ones in the default packages folder) with only the .nupkg files.

我的问题是将.nupkg文件复制到该服务器时我需要做些事情.我可能会丢失一些东西.

My question is there something that I need to do when copying the .nupkg files to that server.I might be missing something.

我已经仔细检查了软件包是否在本地服务器中

I have already doubled checked that the packages exist in the local Server

推荐答案

我在使用TFS时遇到了同样的问题.我所做的修复工作很清楚,正在运行构建的用户配置文件(%LocalAppData%\ NuGet \ Cache)中的nuget缓存很清楚.我只是清空目录,然后再次运行构建,然后就可以了.

I had this same problem using TFS. What I did that fixed it was clear the nuget cache in the user profile that was running the build (%LocalAppData%\NuGet\Cache). I just emptied the directory and ran the build again, then it worked.

这篇关于MSBuild NuGet.targets,Nuget.exe:无法从路径'blah.nupkg'错误读取软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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