0
votes

I'm relatively new to Azure DevOps, but I've already created 4 other pipelines that are working. I'm running into trouble with a build pipeline that is not pulling in NuGet references. I added the Task NuGet restore, but it's only getting some of the packages.

It works when I build in Visual Studio 2017. If I do a nuget restore from the command line, some of the packages are fetched. When I build, Visual Studio fetches the additional packages at the beginning of the build. Why is the NuGet restore task not fetching all of the packages? Why are the remaining packages fetched during the Visual Studio build, but not during the Azure DevOps build?

My project is old legacy ASP.NET that my boss wants automated. I'm talking the version of ASP.NET with .ASPX files that preceded MVC.

This is the error from the Azure DevOps build:

[error]WebApp\web.config(95,0): Error ASPCONFIG: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

1
Were you able to fix this issue finally? I am running into the same situationGreg

1 Answers

0
votes

For this issue , first, make sure to select vs2017-win2016 agent when running the pipeline.

enter image description here

Secondly you can try to install the latest nuget.

enter image description here

Another possibility for your issue could be that some packages used by your project is not hosted in nuget.org. If part of the packages used locally are hosted in private server or local package source, the online Nuget Restore Task can't download the mssing packages. Please check your packages.config and project file to make sure all your packages are hosted in nuget.org.