Error building with Jenkins and Msbuild

Asked

Viewed 224 times

1

I’m trying to create a build job in Jenkins, I’ve already set up the folder where he searches the Msbuild.exe and also the plugin however at the time I put it to run gives this error: `

C: Program Files (x86) Jenkins Workspace Test Controleestoque.Web Controleestoque.Web.csproj(403,5): error : This project 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.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 

Because the Msbuild is complaining about the Nuget? It comes already installed or not?

  • 1

    Have you set up a plugin for Nuget? You can add a Restore run in the batch command directly with its executable, search for a plugin, or simply copy your Packages folder with the libraries already downloaded to the project directory in Jenkins... But whenever you add or remove a new one you would have to do this equalization.

1 answer

1


Well, given a little research 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 ( When running Windows command ) build, which was precisely this command:

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.