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.
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.
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.
Member
97 Points
418 Posts
Error on Building Checked-in Code
Jul 12, 2019 06:02 PM|lesponce|LINK
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
Participant
1300 Points
522 Posts
Re: Error on Building Checked-in Code
Jul 15, 2019 03:28 AM|Wei Zhang|LINK
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
Member
97 Points
418 Posts
Re: Error on Building Checked-in Code
Jul 17, 2019 02:28 PM|lesponce|LINK
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.