NUnit Enviroment Block is too long

Hello,

using NUnit 2.6.2 in in Continua, we get an Error (see below). Ist there a way to use larger Enviroment variables than 65535 bytes?

ProcessModel: Default DomainUsage: Multiple
Execution Runtime: net-4.0
Unhandled Exception:
System.InvalidOperationException: The environment block used to start a process cannot be longer than 65535 bytes. Your environment block is 65550 bytes long. Remove some environment variables and try again.
at System.Diagnostics.EnvironmentBlock.ToByteArray(StringDictionary sd, Boolean unicode)
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at NUnit.Util.TestAgency.LaunchAgentProcess(RuntimeFramework targetRuntime)
at NUnit.Util.TestAgency.CreateRemoteAgent(RuntimeFramework framework, Int32 waitTime)
at NUnit.Util.TestAgency.GetAgent(RuntimeFramework framework, Int32 waitTime)
at NUnit.Util.ProcessRunner.Load(TestPackage package)
at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
at NUnit.ConsoleRunner.Runner.Main(String[] args)
Action ‘NUnit [${FilePatterns}]’ has failed due to an error.
NUnit executable terminated unexpectedly

Hi Nicolas,

The environment block limit is imposed by the NUnit 2.* command line rather than Continua CI. Note that the NUnit 3 command line does not impose such a limit.

Have you ticked the “Generate system environment variables” checkbox on the Environment tab of the NUnit action settings?

image

The system environmental variables include all the Continua CI variables and expressions and can be a very large block. You probably don’t use them in your NUnit tests, so we recommend clearing this checkbox. If you do require any of these system environment variables, enter them explicitly into the Environment Variables field instead.

Otherwise, check the number of environmental variables defined on the server operating system - are they all required?