Reputation: 60724
After I did what seemed like an innocent change yesterday, updating MongoDb driver from version 2.5 to 2.7, I tried to rebuild the website in Azure.
In Azure I'm running a App Service connected to my project in Git.
The build fails on Running Deployment Command with the following log:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\src\Audit\Audit.csproj...
D:\Program Files (x86)\dotnet\sdk\2.1.500\NuGet.targets(114,5): error : Could not find file 'D:\home\.nuget\mongodb.driver\2.4.0\mongodb.driver.2.4.0.nupkg'. [D:\home\site\repository\Cerebro-Audit.sln]
Failed exitCode=1, command=dotnet restore "D:\home\site\repository\Cerebro-Audit.sln"
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\78.11022.3613\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
And if I check in the Azure console inside the folder D:\home\.nuget\mongodb.driver\2.4.0\
I can see that the nupkg
file is not there. The nuspec file, licence file and lib folder are all there, but not the nupkg file.
So there are some strange things here. First of, why is it still looking for the 2.4.0 version of the package even if I have updated it to 2.7.2 in the project file? Why is not 2.7.2 downloaded at all? Why is the 2.4.0 nupkg file suddenly gone?
Hope someone can help me to get the project building again.
Upvotes: 1
Views: 260
Reputation: 388
Ran into the same issue today. Guessing the original poster solved it by now, but for others... clearing the .nuget folder out and re-deploying fixed.
Upvotes: 1