167 references to SetEnvironmentVariable
Microsoft.Build.BuildCheck.UnitTests (9)
EndToEndTests.cs (6)
335_env.SetEnvironmentVariable("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER", "0"); 339_env.SetEnvironmentVariable("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER", "1"); 966_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", buildInOutOfProcessNode ? "1" : "0"); 969_env.SetEnvironmentVariable("TestFromTarget", "FromTarget"); 970_env.SetEnvironmentVariable("TestFromEvaluation", "FromEvaluation"); 971_env.SetEnvironmentVariable("TestImported", "FromEnv");
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.CommandLine.UnitTests (22)
CommandLineSwitches_Tests.cs (2)
1105env.SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", "17.10"); 1386env.SetEnvironmentVariable("ENVIRONMENTVARIABLE", string.Empty);
MSBuildServer_Tests.cs (7)
96_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 145_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 180_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 239_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 279_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 292_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 322_env.SetEnvironmentVariable("MSBUILDUSESERVER", "1");
PerfLog_Tests.cs (2)
30testEnv.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", perfLogFolder.Path); 66testEnv.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", perfLogPath);
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
XMake_Tests.cs (8)
535env.SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", ""); 579env.SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_10.ToString()); 924testEnvironment.SetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE, "ja"); // Japanese chose arbitrarily. 1127testEnvironment.SetEnvironmentVariable("DOTNET_CLI_UI_LANGUAGE", "en"); // build machines may have other values. 2608_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 2719testEnvironment.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 2720testEnvironment.SetEnvironmentVariable("MSBUILDDISABLENODEREUSE", "1"); 2832_env.SetEnvironmentVariable(env.Key, env.Value);
Microsoft.Build.Engine.OM.UnitTests (15)
Construction\ConstructionEditing_Tests.cs (1)
3224env.SetEnvironmentVariable("MSBuildSDKsPath", testSdkRoot);
Definition\Project_Tests.cs (8)
3891env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 3934env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 3973env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 4018env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 4065env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 4105env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 4148env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 4193env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1");
Definition\ProjectItem_Tests.cs (3)
3121env.SetEnvironmentVariable("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation", "non empty value"); 3319env.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 3770_env.SetEnvironmentVariable("MSBUILDDICTIONARYBASEDITEMREMOVETHRESHOLD", "0");
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.Engine.UnitTests (92)
BackEnd\BuildManager_Logging_Tests.cs (2)
102_env.SetEnvironmentVariable("MSBUILDCUSTOMBUILDEVENTWARNING", envVariableValue); 103_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1");
BackEnd\BuildManager_Tests.cs (23)
88_inProcEnvCheckTransientEnvironmentVariable = _env.SetEnvironmentVariable("MSBUILDINPROCENVCHECK", "1"); 341_env.SetEnvironmentVariable("MSBUILDDEBUGCOMM", "1"); 406RunOutOfProcBuild(_ => _env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1")); 440_env.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 490_env.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 567_env.SetEnvironmentVariable("MSBuildForwardPropertiesFromChild", "InitialProperty2;IAMNOTREAL"); 606_env.SetEnvironmentVariable("MsBuildForwardAllPropertiesFromChild", "InitialProperty2;IAMNOTREAL"); 647_env.SetEnvironmentVariable("MsBuildForwardAllPropertiesFromChild", "InitialProperty2;IAMNOTREAL"); 648_env.SetEnvironmentVariable("MsBuildForwardPropertiesFromChild", "Something"); 695_env.SetEnvironmentVariable("MsBuildForwardPropertiesFromChild", "InitialProperty3;IAMNOTREAL"); 696_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 701_env.SetEnvironmentVariable("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION", "0"); 768_env.SetEnvironmentVariable("MsBuildForwardPropertiesFromChild", "InitialProperty3;IAMNOTREAL"); 769_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 771_env.SetEnvironmentVariable("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION", "0"); 830_env.SetEnvironmentVariable("MsBuildForwardPropertiesFromChild", ""); 831_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 894_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 928_env.SetEnvironmentVariable("MsBuildForwardPropertiesFromChild", null); 929_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 1880_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 2341_env.SetEnvironmentVariable("MSBUILDDEBUGFORCECACHING", "1"); 4162_env.SetEnvironmentVariable("MSBUILDNODECONNECTIONTIMEOUT", "0");
BackEnd\CacheAggregator_Tests.cs (6)
51env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 64env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 90env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 117env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 140env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 171env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1");
BackEnd\ResultsCache_Tests.cs (2)
407env.SetEnvironmentVariable("MSBUILDDONOTVERSIONBUILDRESULT", $"{envValue1}"); 423env.SetEnvironmentVariable("MSBUILDDONOTVERSIONBUILDRESULT", $"{envValue2}");
BackEnd\SdkResultOutOfProc_Tests.cs (3)
68_env.SetEnvironmentVariable("MSBUILDINPROCENVCHECK", "1"); 69_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 72_env.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
BackEnd\TaskBuilder_Tests.cs (1)
101env.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", @"C:\Users\namytelk\Desktop");
BackEnd\TaskExecutionHost_Tests.cs (1)
1066env.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugFolder.Path);
BinaryLogger_Tests.cs (5)
337env.SetEnvironmentVariable("EnvVar1", "itsValue"); 338env.SetEnvironmentVariable("EnvVar2", "value2"); 339env.SetEnvironmentVariable("EnvVar3", "value3"); 415env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 571env.SetEnvironmentVariable("MSBUILDDEBUGFORCECACHING", "1");
ChangeWaves_Tests.cs (1)
34env.SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", wave);
Construction\ProjectRootElement_Tests.cs (6)
72env.SetEnvironmentVariable("MSBUILDLOADALLFILESASREADONLY", null); // clear 73env.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", null); // clear 74env.SetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE", null); // clear 103env.SetEnvironmentVariable("MSBUILDLOADALLFILESASREADONLY", "1"); 104env.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", null); // clear 105env.SetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE", null); // clear
Evaluation\Evaluator_Tests.cs (6)
1709env.SetEnvironmentVariable("MSBUILDUSECASESENSITIVEITEMNAMES", "1"); 1793env.SetEnvironmentVariable("MSBUILDUSECASESENSITIVEITEMNAMES", "1"); 4576env.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 5011env.SetEnvironmentVariable("MsBuildLogPropertyTracking", envVarValue); 5014env.SetEnvironmentVariable("DEFINED_ENVIRONMENT_VARIABLE", "It's Defined!"); 5015env.SetEnvironmentVariable("DEFINED_ENVIRONMENT_VARIABLE2", "It's also Defined!");
Evaluation\Expander_Tests.cs (4)
2591env.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 5023env.SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_12.ToString()); 5100env.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 5130env.SetEnvironmentVariable("MSBuildLogPropertyFunctionsRequiringReflection", "1");
Evaluation\ItemEvaluation_Tests.cs (3)
594env.SetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes", ".*foo.*;.*yyy*."); 655env.SetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes", ".*"); 685env.SetEnvironmentVariable("MsBuildCacheFileEnumerations", "1");
Evaluation\ProjectCollection_Tests.cs (1)
24env.SetEnvironmentVariable(envKey, "true");
Evaluation\ProjectSdkImplicitImport_Tests.cs (14)
102_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 126_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 181_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 221_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 255_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 292_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 323_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 385_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 408_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 436_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 514_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 633_env.SetEnvironmentVariable("MSBuildSDKsPath", _testSdkRoot); 634_env.SetEnvironmentVariable("MSBUILD_SDKREFERENCE_PROPERTY_EXPANSION_MODE", data.Mode?.ToString()); 635_env.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", "false");
EvaluationProfiler_Tests.cs (1)
64_env.SetEnvironmentVariable("MSBUILDINPROCENVCHECK", "1");
FileMatcher_Tests.cs (1)
1285env.SetEnvironmentVariable("MsBuildCacheFileEnumerations", "1");
PrintLineDebugger_Tests.cs (3)
206env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 228env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 250env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1");
ProjectCache\ProjectCacheTests.cs (2)
751_env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1"); 1654_env.SetEnvironmentVariable(exceptionLocation, errorKind.ToString());
TerminalLoggerConfiguration_Tests.cs (3)
111_env.SetEnvironmentVariable("DOTNET_CLI_CONFIGURE_MSBUILD_TERMINAL_LOGGER", bool.TrueString); 140_env.SetEnvironmentVariable(envVarSource, bool.TrueString); 227_ = _env.SetEnvironmentVariable("MSBUILDNOINPROCNODE", msbuildinprocnodeState);
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
Utilities_Tests.cs (1)
84env.SetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE", "1");
Microsoft.Build.Framework.UnitTests (3)
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.Tasks.UnitTests (10)
Exec_Tests.cs (4)
80env.SetEnvironmentVariable("LANG", null); 81env.SetEnvironmentVariable("LC_ALL", null); 87env.SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_10.ToString()); 535testEnvironment.SetEnvironmentVariable(environmentVariableName, environmentVariableValue);
PrintLineDebugger_Tests.cs (3)
206env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 228env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 250env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1");
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.UnitTests.Shared (6)
ObjectModelHelpers.cs (1)
1474env.SetEnvironmentVariable("MSBUILDFAILONDRIVEENUMERATINGWILDCARD", setEnvVar);
RunnerUtilities.cs (1)
26testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", s_dotnetExePath);
TestEnvironment.cs (4)
57env.SetEnvironmentVariable("MSBUILDLIVELOGGER", null); 58env.SetEnvironmentVariable("MSBUILDTERMINALLOGGER", null); 102SetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION", null); 380SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1");
Microsoft.Build.Utilities.UnitTests (10)
EncodingUtilities_Tests.cs (1)
52testEnvironment.SetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE, inputLanguage);
PrintLineDebugger_Tests.cs (3)
206env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 228env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1"); 250env.SetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER", "1");
TestAssemblyInfo.cs (3)
58_testEnvironment.SetEnvironmentVariable("VisualStudioVersion", null); 62_testEnvironment.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", null); 132testEnvironment.SetEnvironmentVariable("DOTNET_HOST_PATH", dotnetPath);
ToolTask_Tests.cs (3)
661env.SetEnvironmentVariable("PATH", $"{tempDirectory}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}"); 790testEnvironment.SetEnvironmentVariable(environmentVariableName, environmentVariableValue); 846testEnvironment.SetEnvironmentVariable(environmentVariableName, environmentVariableValue);