MSBuild NuGet.targets ,Nuget.exe : Unable to read package from path 'blah.nupkg' error
msbuild, nuget, nuget-package, teamcity
Solution
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.
Problem
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" . 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'. Whats is strange other packages are downloaded fine to the TeamCity working folder -the package folder. The local Nuget Server contains copies of my VS solution packages(the ones in the default packages folder) with only the .nupkg files. 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