question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`dotnet.exe msbuild` exits code 1 even if MSBuild succeeds

See original GitHub issue

Steps to reproduce

So far, this only reproduces on our Windows 2012 R2 machines, but it is consistent. I can get you access to a machine to investigate more.

We are trying to upgrade ASP.NET Core to build with the 2.1.300-preview3-008646 SDK. Previously we were building with 2.1.300-preview2-008530. https://github.com/aspnet/BuildTools/commit/ed5ca9de3c652347dbb0158a9a65eff3471d2114

Expected behavior

Exit code 0 when a build completes

Actual behavior

dotnet.exe exits code 1, even though MSBuild succeeds.

[18:35:10]  EventNotification     | 
[18:35:10]  EventNotification     | Build succeeded.
[18:35:10]  EventNotification     |     0 Warning(s)
[18:35:10]  EventNotification     |     0 Error(s)
[18:35:10]  EventNotification     | 
[18:35:10]  EventNotification     | Time Elapsed 00:00:37.68
[18:35:11]  dotnet.exe failed with exit code: 1
[18:35:11]  At C:\b\w\6e78c7aba2f17cd5\.dotnet\buildtools\korebuild\2.1.0-rc1-15774\scripts
[18:35:11]  \common.psm1:11 char:9
[18:35:11]  +         throw "$cmdName failed with exit code: $exitCode"
[18:35:11]  +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[18:35:11]      + CategoryInfo          : OperationStopped: (dotnet.exe failed with exit c 
[18:35:11]     ode: 1:String) [], RuntimeException
[18:35:11]      + FullyQualifiedErrorId : dotnet.exe failed with exit code: 1

image

Environment data

dotnet --info output:

2.1.300-preview3-008646

cc @muratg @pranavkm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
livarcocccommented, Apr 23, 2018

Closing this one in favor of https://github.com/Microsoft/msbuild/pull/3215.

0reactions
natemcmastercommented, Apr 20, 2018

I ran a build with MSBUILDDISABLENODEREUSE=1 last night, but it failed with the same problem. 😕

@rainersigwald I’ll send you a link to the internal server that is failing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`dotnet.exe msbuild` exits code 1 even if MSBuild succeeds
One possible change candidate: post-preview2, we turned on MSBuild node reuse on *nix by default, after fixing an issue with calling dotnet ......
Read more >
MSBuild exited with code 1 error
Typically I copy the command that failed into a cmd prompt and run it manually to determine why it is failing. · The...
Read more >
VS 2022 "The msbuild command returned exit code 1" error
VS 2022 "The msbuild command returned exit code 1" error: Hello. I am uising the following: NCrunch version 4.10.0.6 Microsoft Visual Studio Enterprise...
Read more >
The process '/usr/bin/dotnet' failed with exit code 1 [error] ...
I build the project and published in local IIS as well as Azure Web Apps. Its working perfectly in both the places. Now...
Read more >
[error]Process 'msbuild.exe' exited with code '1'
In Azure DevOps, I created a new Agent called "Test pool". when I create a Build pipeline, I am getting the below error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found