Reputation: 1710
I have a project on ASP.NET Web API that has references to many libraries. When we tried to do our usual CI/CD to the App Service via Deployment Center. We faced with issues.
We need to remove .csproj in order for the deployment to work else we are facing this error on server
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.
However we require the csproj files for the various members in the team to work together for this particular project.
In this case, what is the likely solution that we can adopt?
Upvotes: 2
Views: 122
Reputation: 330
Problem: The source control will only contain references for the binaries. The packages should be restored before a build can be triggered.
Fix: Add a step in your CI/CD to restore the NuGet packages in the project before you trigger a build. Ref attached image.
Upvotes: 1