locked
Error on Building Checked-in Code RRS feed

  • Question

  • User2012297617 posted

    I'm currently getting an error when I try to build my checked-in code. Unfortunately, the error is very generic.... it only says "exited with code 1".

    The is the entire error:

    D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\PreBuild.csproj (43): The command ""D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\..\tools\NuGet.exe" restore "D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\..\MyProject\src\MyProject.sln"" exited with code 1.

    I'm getting this error as well:

    Other Errors

    1 error(s)

    Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    I already ran the command below, but no luck.  Any help is greatly appreciated. 

    Install-Package NuGetEnablePackageRestore

    Friday, July 12, 2019 6:02 PM

All replies

  • User-1174608757 posted

    Hi lesponce,

    According to you description,It seems that you have defined a command to call nuget.exe to restore nuget package in xx.sln.

    So I suggest that you could directly open cmd.exe in your local machine , copy the command in your build-event to the cmd.exe, and check if it executes successfully. If it failed ,it shows that it has error in command else if it works well, I think your .sln file has been occupied by other process.

    Best Regards

    Wei

    Monday, July 15, 2019 3:28 AM
  • User2012297617 posted

    Thanks for  your reply.  That didn't work.  After doing some research, it seems like that nuget restore command is deprecate.  I removed that instruction for now. The build worked successfully.  

    Command Issue:

    D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\PreBuild.csproj (43): The command ""D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\..\tools\NuGet.exe" restore "D:\WorkingDirectories\1\Project\CI-Main\src\PreBuild\..\MyProject\src\MyProject.sln"" exited with code 1.

    Wednesday, July 17, 2019 2:28 PM