MSBuild.exe has stopped working

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


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

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\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

http://stackoverflow.com/questions/13707234/why-does-visual-studio-crashes-on-opening-a-solution-because-of-environment-vari

Check your environment variables.

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.







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?

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