Error building with Jenkins and MSBuild

0

I'm trying to create a build job in Jenkins, I've already set up the folder where it looks for MSBuild.exe and also the plugin, however, the time I put it to run gives this error: '

  

C: \ Program Files   (x86) \ Jenkins \ workspace \ Test \ Controls.Web.Control \ Web.csproj (403.5):   error: This project references NuGet package (s) that are missing on   this computer. Use NuGet Package Restore to download them. For more   information, see link . The   missing file is   .. \ packages \ Microsoft.Net.Compilers.1.0.0 \ build \ Microsoft.Net.Compilers.props.

I'm putting the following parameters in the build command

/p:Configuration=Release /t:build /p:DeployOnBuild=True 

Why is MSBuild complaining about NuGet ? Is it already installed or not?

    
asked by anonymous 22.08.2018 / 16:59

1 answer

0

Well, giving a researched I realized that Nuget has to be installed.

So I installed it and put it in the root directory of my machine "C:" .

There in the build JOB settings I added in a new step before entering the command command, which was exactly this command:

C:\Nuget\nuget.exe restore "Caminho da minha solução" . And it worked

    
22.08.2018 / 17:20