# MSBuild.exe has stopped working

**URL:** https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486
**Category:** Bugs
**Created:** [April 26, 2013, 10:19am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486 "2013-04-26T10:19:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 26, 2013, 10:19am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/1 "2013-04-26T10:19:23Z")

</div>

Hi Vincent,   
  
 We are using FinalBuilder7 version on our Build servers to build our applications. For example we are having multiple builds in a single Project.We are uisng MSBuild action to build but recently we are getting an error while building a Project in the middle (while building a particular build). The error message is like this “MSBuild.exe has stopped working” We had searched a lot regarding this but did not find any solution. This is highly impacting our automated build(Scheduled using Scheduler) as it is stopping in the middle.   
  
 Please find the attached error screen shot(msbuilderror.png) for this and also Error description below . Please help do needful…   
  
 Description:   
 Stopped working   
  
 Problem signature:   
 Problem Event Name: CLR20r3   
 Problem Signature 01: msbuild.exe   
 Problem Signature 02: 4.0.30319.1   
 Problem Signature 03: 4ba1e78d   
 Problem Signature 04: mscorlib   
 Problem Signature 05: 4.0.0.0   
 Problem Signature 06: 4e181ae3   
 Problem Signature 07: c15   
 Problem Signature 08: 43   
 Problem Signature 09: System.ArgumentException   
 OS Version: 6.0.6002.2.2.0.274.10   
 Locale ID: 1033

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 26, 2013, 10:33am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/2 "2013-04-26T10:33:16Z")

</div>

Is there any log output in FinalBuilder for this action? Any other eventlog entries?

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 26, 2013, 1:34am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/3 "2013-04-26T01:34:26Z")

</div>

Hi Vincent,   
  
 Please find the below build log for the above error .   
  
 MSBuild Properties   
 Configuration=“Release”   
 Platform=“Any CPU”   
 OutDir=“F:\IDECode\_Automate\CXM\releases\Release\_13\_05\Site\bin\”   
 Running C:\Windows\[Microsoft.NET](http://Microsoft.NET)\Framework\v4.0.30319\MSBuild.exe with parameters : /t:Clean /logger:FinalBuilderLogger,“C:\Program Files (x86)\FinalBuilder 7\FinalBuilder.MSBuild.Logging.v3.5.dll” /noconlog /p:Configuration=“Release”;Platform=“Any CPU”;OutDir=“F:\IDECode\_Automate\CXM\releases\Release\_13\_05\Site\bin\” /v:normal /m “F:\IDECode\_Automate\CXM\releases\Release\_13\_05\Site\Areas\members\Members.sln”   
 ------   
 Microsoft ® Build Engine Version 4.0.30319.1   
 [Microsoft .NET Framework, Version 4.0.30319.239]   
 Copyright © Microsoft Corporation 2007. All rights reserved.   
 Build started 4/26/2013 7:08:43 AM.   
 Stop signalled.   
 Unhandled Exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Environment variable name or value is too long.   
 =============   
 System.ArgumentException: Environment variable name or value is too long.   
 at System.Environment.SetEnvironmentVariable(String variable, String value)   
 at Microsoft.Build.BackEnd.InProcNode.HandleShutdown(Exception& exception)   
 at Microsoft.Build.BackEnd.InProcNode.Run(Exception& shutdownException)   
  
 —\> System.ArgumentException: Environment variable name or value is too long.   
 at System.Environment.SetEnvironmentVariable(String variable, String value)   
 at Microsoft.Build.BackEnd.InProcNode.HandleShutdown(Exception& exception)   
 at Microsoft.Build.BackEnd.InProcNode.Run(Exception& shutdownException)   
 — End of inner exception stack trace —   
 at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args)   
 at Microsoft.Build.BackEnd.InProcNode.Run(Exception& shutdownException)   
 at Microsoft.Build.BackEnd.NodeProviderInProc.InProcNodeThreadProc()   
 at System.Threading.ThreadHelper.ThreadStart\_Context(Object state)   
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)   
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   
 at System.Threading.ThreadHelper.ThreadStart()   
 MSBuild.exe returned Error code : -532462766

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 26, 2013, 3:34am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/4 "2013-04-26T03:34:36Z")

</div>

[http://stackoverflow.com/questions/13707234/why-does-visual-studio-crashes-on-opening-a-solution-because-of-environment-vari](http://stackoverflow.com/questions/13707234/why-does-visual-studio-crashes-on-opening-a-solution-because-of-environment-vari)   
  
 Check your environment variables.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 29, 2013, 1:34am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/5 "2013-04-29T01:34:33Z")

</div>

Hi Vincent,   
  
 We are using the following path in the solution path of Msbuild action at which we are getting the above mentioned error (Unhandled Exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Environment variable name or value is too long. )   
 Path we are using :   
 %ABCApplicationPath%%Release%\Site\Areas\members\Members.sln.   
 Here %ABCApplicationPath%=F:\ABCCode\_Automate\ABC\Releases   
 %Release%=Release\_14\_06   
 When we are building this we are gettting the error for first time after that we are stopping the Final builder solution and when tried to rebuild again from error point its working. We are not sure about this behaviour. Could you please help regardig this?Its affecting our automated builds.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 29, 2013, 2:25am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/6 "2013-04-29T02:25:11Z")

</div>

You really haven’t given us anything to work with. What environment variables do you have, how long are you variables names in FinalBuilder, do you have any of those set to be exposed as Environment variables?

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 29, 2013, 2:41am UTC](https://www.finalbuilder.com/forums/t/msbuild-exe-has-stopped-working/3486/7 "2013-04-29T02:41:28Z")

</div>

Actually we created Project variables while creating the variables we checked(checkbox) all the variables as(Make it as Environment variable). The below variables are project variable.   
 %ABCApplicationPath%%Release%\Site\Areas\members\Members.sln.   
 Here %ABCApplicationPath%=F:\ABCCode\_Automate\ABC\Releases   
 %Release%=Release\_14\_06
