Reputation: 608
Iam trying to deploy a asp.NET application with Azure AppService. But at the end it fails and the message says :
error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets.
Failed exitCode=1, command=dotnet publish "D:\home\site\repository\test.WebApp.V1\test.WebApp.V1.csproj" --output "D:\local\Temp\8d77908b55668cc" --configuration Release
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\85.11108.4192\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
I have no experience with asp dotNet Frameworks or even C#, but i understand that it tries to download some dependencies from nuget, but did not manage.
How can i tackle this issue ? thanks
Upvotes: 0
Views: 1079
Reputation: 756
Based on this D:\Program Files (x86)\SiteExtensions\Kudu\85.11108.4192\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
I assume you are using Kudu to deploy.
Do the instructions from this thread work?
Go to Kudu Console for your site
Go to d:\home\site\repository
Run 'nuget restore' from here
Upvotes: 1
Reputation: 18387
If you're using dotnet core, just go to the project directory, open a cmd from it and run:
dotnet restore
In case you're using dotnet framework:
Enable automatic package restore by choosing Tools > Options > NuGet Package Manager, and then selecting Automatically check for missing packages during build in Visual Studio under Package Restore, then just build the solution and it will retrieve the missing packages.
More info in here:
https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore
Upvotes: 0