Hi Support Team,
we use a ContinuaCI Build Server to build C# programs via FinalBuilder-Actions ('Build VS.Net Solution' and 'MSBuild Project'). After update to v1.8.1.938 they fail with the following error:
MSBuild Properties
Configuration="Release"
Platform="Any CPU"
OutDir=C:\ContinuaCI\Agent\Ws\18484\GuckstDu\Bin\
Running C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe with parameters : /t:Rebuild /nr:false /logger:FinalBuilderLogger,"C:\Program Files (x86)\FinalBuilder 7\FinalBuilder.MSBuild.Logging.v4.0.dll" /noconlog /p:Configuration="Release";Platform="Any CPU";OutDir=C:\ContinuaCI\Agent\Ws\18484\GuckstDu\Bin\ /v:normal /m "C:\ContinuaCI\Agent\Ws\18484\GuckstDu\DotNet\GuckstDu_DotNet.sln"
------
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 28.06.2018 16:19:33.
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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
[Error] msbuild.exe returned Error code : 255
I've added an execute action just before the MSBuild action (cmd /c set), which revealed a suspicious environment variable:
ContinuaCI.Build.ChangesetRevisions=131516dd5756798818d4bf72c2910.... and several more letters - to be exact: the length after the eqal sign is 8155.
This drawed my attention to a fact equal to all failed builds: the amount of changesets for these builds are very high (more than 1000).
I have no idea, why ContinuaCI determines more than 1000 changesets because in fact there are only a few since the last build. But I'm sure that the reason why MSBuild will fail is the very large environment variable (ContinuaCI.Build.ChangesetRevisions).
Would you mind to consider this variable not to exceed a specific length (I assume it is not required by MSBuild.exe)? The threshold should suit to MSBuild restrictions.
If not: is it possible for me to remove this environment variable before I start the MSBuild related actions?
Any help is very appreciated because we are currently incapable of providing new software builds.
Best regards
Michael