177 references to SetEnvironmentVariable
Microsoft.Build.BuildCheck.UnitTests (5)
EndToEndTests.cs (2)
120
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", buildInOutOfProcessNode ? "1" : "0");
121
_env.
SetEnvironmentVariable
("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION", "1");
TestAssemblyInfo.cs (3)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.CommandLine.UnitTests (23)
CommandLineSwitches_Tests.cs (2)
1105
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", "17.10");
1386
env.
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)
30
testEnv.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", perfLogFolder.Path);
66
testEnv.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", perfLogPath);
TestAssemblyInfo.cs (3)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
XMake_Tests.cs (9)
534
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", "");
578
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_10.ToString());
925
testEnvironment.
SetEnvironmentVariable
(DOTNET_CLI_UI_LANGUAGE, "ja"); // Japanese chose arbitrarily.
929
testEnvironment.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_8.ToString());
1136
testEnvironment.
SetEnvironmentVariable
("DOTNET_CLI_UI_LANGUAGE", "en"); // build machines may have other values.
2557
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
2668
testEnvironment.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
2669
testEnvironment.
SetEnvironmentVariable
("MSBUILDDISABLENODEREUSE", "1");
2781
_env.
SetEnvironmentVariable
(env.Key, env.Value);
Microsoft.Build.Engine.OM.UnitTests (17)
Construction\ConstructionEditing_Tests.cs (1)
3184
env.
SetEnvironmentVariable
("MSBuildSDKsPath", testSdkRoot);
Construction\ProjectRootElement_Tests.cs (1)
1842
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
Construction\ProjectTargetElement_Tests.cs (1)
352
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
Definition\Project_Tests.cs (8)
3858
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
3901
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
3940
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
3985
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4032
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4072
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4115
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4160
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
Definition\ProjectItem_Tests.cs (3)
3115
env.
SetEnvironmentVariable
("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation", "non empty value");
3313
env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
3764
_env.
SetEnvironmentVariable
("MSBUILDDICTIONARYBASEDITEMREMOVETHRESHOLD", "0");
TestAssemblyInfo.cs (3)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.Engine.UnitTests (103)
BackEnd\BuildManager_Logging_Tests.cs (2)
102
_env.
SetEnvironmentVariable
("MSBUILDCUSTOMBUILDEVENTWARNING", envVariableValue);
103
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
BackEnd\BuildManager_Tests.cs (22)
88
_inProcEnvCheckTransientEnvironmentVariable = _env.
SetEnvironmentVariable
("MSBUILDINPROCENVCHECK", "1");
342
_env.
SetEnvironmentVariable
("MSBUILDDEBUGCOMM", "1");
407
RunOutOfProcBuild(_ => _env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1"));
441
_env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
491
_env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
568
_env.
SetEnvironmentVariable
("MSBuildForwardPropertiesFromChild", "InitialProperty2;IAMNOTREAL");
607
_env.
SetEnvironmentVariable
("MsBuildForwardAllPropertiesFromChild", "InitialProperty2;IAMNOTREAL");
648
_env.
SetEnvironmentVariable
("MsBuildForwardAllPropertiesFromChild", "InitialProperty2;IAMNOTREAL");
649
_env.
SetEnvironmentVariable
("MsBuildForwardPropertiesFromChild", "Something");
696
_env.
SetEnvironmentVariable
("MsBuildForwardPropertiesFromChild", "InitialProperty3;IAMNOTREAL");
697
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
702
_env.
SetEnvironmentVariable
("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION", "0");
761
_env.
SetEnvironmentVariable
("MsBuildForwardPropertiesFromChild", "InitialProperty3;IAMNOTREAL");
762
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
812
_env.
SetEnvironmentVariable
("MsBuildForwardPropertiesFromChild", "");
813
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
876
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
910
_env.
SetEnvironmentVariable
("MsBuildForwardPropertiesFromChild", null);
911
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
1815
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
2276
_env.
SetEnvironmentVariable
("MSBUILDDEBUGFORCECACHING", "1");
4095
_env.
SetEnvironmentVariable
("MSBUILDNODECONNECTIONTIMEOUT", "0");
BackEnd\CacheAggregator_Tests.cs (6)
51
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
64
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
90
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
117
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
140
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
171
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
BackEnd\SdkResolverService_Tests.cs (1)
160
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_4.ToString());
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)
100
env.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", @"C:\Users\namytelk\Desktop");
BackEnd\TaskExecutionHost_Tests.cs (1)
1066
env.
SetEnvironmentVariable
("MSBUILDDEBUGPATH", debugFolder.Path);
BackEnd\TaskHostFactory_Tests.cs (1)
85
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
BinaryLogger_Tests.cs (5)
337
env.
SetEnvironmentVariable
("EnvVar1", "itsValue");
338
env.
SetEnvironmentVariable
("EnvVar2", "value2");
339
env.
SetEnvironmentVariable
("EnvVar3", "value3");
415
env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
571
env.
SetEnvironmentVariable
("MSBUILDDEBUGFORCECACHING", "1");
ChangeWaves_Tests.cs (1)
34
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", wave);
Construction\ProjectRootElement_Tests.cs (6)
72
env.
SetEnvironmentVariable
("MSBUILDLOADALLFILESASREADONLY", null); // clear
73
env.
SetEnvironmentVariable
("MSBuildLoadMicrosoftTargetsReadOnly", null); // clear
74
env.
SetEnvironmentVariable
("MSBUILDLOADALLFILESASWRITEABLE", null); // clear
103
env.
SetEnvironmentVariable
("MSBUILDLOADALLFILESASREADONLY", "1");
104
env.
SetEnvironmentVariable
("MSBuildLoadMicrosoftTargetsReadOnly", null); // clear
105
env.
SetEnvironmentVariable
("MSBUILDLOADALLFILESASWRITEABLE", null); // clear
Evaluation\Evaluator_Tests.cs (6)
1672
env.
SetEnvironmentVariable
("MSBUILDUSECASESENSITIVEITEMNAMES", "1");
1753
env.
SetEnvironmentVariable
("MSBUILDUSECASESENSITIVEITEMNAMES", "1");
4490
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4927
env.
SetEnvironmentVariable
("MsBuildLogPropertyTracking", envVarValue);
4930
env.
SetEnvironmentVariable
("DEFINED_ENVIRONMENT_VARIABLE", "It's Defined!");
4931
env.
SetEnvironmentVariable
("DEFINED_ENVIRONMENT_VARIABLE2", "It's also Defined!");
Evaluation\Expander_Tests.cs (3)
2538
env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
4967
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_12.ToString());
5044
env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
Evaluation\IntrinsicFunctionOverload_Tests.cs (5)
42
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaveForOverloading.ToString());
133
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaveForOverloading.ToString());
224
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaveForOverloading.ToString());
315
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaveForOverloading.ToString());
406
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaveForOverloading.ToString());
Evaluation\ItemEvaluation_Tests.cs (2)
592
env.
SetEnvironmentVariable
("MsBuildSkipEagerWildCardEvaluationRegexes", ".*foo.*;.*yyy*.");
648
env.
SetEnvironmentVariable
("MsBuildCacheFileEnumerations", "1");
Evaluation\ProjectCollection_Tests.cs (1)
24
env.
SetEnvironmentVariable
(envKey, "true");
Evaluation\ProjectSdkImplicitImport_Tests.cs (14)
102
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
125
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
179
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
218
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
251
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
287
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
318
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
379
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
402
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
430
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
507
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
625
_env.
SetEnvironmentVariable
("MSBuildSDKsPath", _testSdkRoot);
626
_env.
SetEnvironmentVariable
("MSBUILD_SDKREFERENCE_PROPERTY_EXPANSION_MODE", data.Mode.ToString());
627
_env.
SetEnvironmentVariable
("MSBUILDINCLUDEDEFAULTSDKRESOLVER", "false");
Evaluation\ProjectStringCache_Tests.cs (9)
34
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
92
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
170
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
255
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
297
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
344
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
383
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
428
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
468
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_6.ToString());
EvaluationProfiler_Tests.cs (1)
64
_env.
SetEnvironmentVariable
("MSBUILDINPROCENVCHECK", "1");
FileMatcher_Tests.cs (1)
1285
env.
SetEnvironmentVariable
("MsBuildCacheFileEnumerations", "1");
PrintLineDebugger_Tests.cs (3)
206
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
228
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
250
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
ProjectCache\ProjectCacheTests.cs (2)
751
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
1653
_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)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Utilities_Tests.cs (1)
84
env.
SetEnvironmentVariable
("MSBUILDLOADALLFILESASWRITEABLE", "1");
Microsoft.Build.Framework.UnitTests (3)
TestAssemblyInfo.cs (3)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.Tasks.UnitTests (10)
Exec_Tests.cs (4)
80
env.
SetEnvironmentVariable
("LANG", null);
81
env.
SetEnvironmentVariable
("LC_ALL", null);
87
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_10.ToString());
535
testEnvironment.
SetEnvironmentVariable
(environmentVariableName, environmentVariableValue);
PrintLineDebugger_Tests.cs (3)
206
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
228
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
250
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
TestAssemblyInfo.cs (3)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.UnitTests.Shared (6)
ObjectModelHelpers.cs (1)
1464
env.
SetEnvironmentVariable
("MSBUILDFAILONDRIVEENUMERATINGWILDCARD", setEnvVar);
RunnerUtilities.cs (1)
26
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", s_dotnetExePath);
TestEnvironment.cs (4)
57
env.
SetEnvironmentVariable
("MSBUILDLIVELOGGER", null);
58
env.
SetEnvironmentVariable
("MSBUILDTERMINALLOGGER", null);
102
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", "");
380
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
Microsoft.Build.Utilities.UnitTests (10)
EncodingUtilities_Tests.cs (1)
52
testEnvironment.
SetEnvironmentVariable
(DOTNET_CLI_UI_LANGUAGE, inputLanguage);
PrintLineDebugger_Tests.cs (3)
206
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
228
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
250
env.
SetEnvironmentVariable
("MSBUILDDONOTLAUNCHDEBUGGER", "1");
TestAssemblyInfo.cs (3)
52
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", string.Empty);
56
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", string.Empty);
126
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
ToolTask_Tests.cs (3)
661
env.
SetEnvironmentVariable
("PATH", $"{tempDirectory}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}");
789
testEnvironment.
SetEnvironmentVariable
(environmentVariableName, environmentVariableValue);
845
testEnvironment.
SetEnvironmentVariable
(environmentVariableName, environmentVariableValue);