168 references to SetEnvironmentVariable
Microsoft.Build.BuildCheck.UnitTests (10)
EndToEndTests.cs (7)
82
_env.
SetEnvironmentVariable
("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER", "0");
86
_env.
SetEnvironmentVariable
("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER", "1");
634
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", buildInOutOfProcessNode ? "1" : "0");
635
_env.
SetEnvironmentVariable
("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION", "1");
638
_env.
SetEnvironmentVariable
("TestFromTarget", "FromTarget");
639
_env.
SetEnvironmentVariable
("TestFromEvaluation", "FromEvaluation");
640
_env.
SetEnvironmentVariable
("TestImported", "FromEnv");
TestAssemblyInfo.cs (3)
58
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", null);
62
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", null);
132
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.CommandLine.UnitTests (22)
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)
58
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", null);
62
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", null);
132
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
XMake_Tests.cs (8)
535
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", "");
579
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_10.ToString());
924
testEnvironment.
SetEnvironmentVariable
(DOTNET_CLI_UI_LANGUAGE, "ja"); // Japanese chose arbitrarily.
1127
testEnvironment.
SetEnvironmentVariable
("DOTNET_CLI_UI_LANGUAGE", "en"); // build machines may have other values.
2608
_env.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
2719
testEnvironment.
SetEnvironmentVariable
("MSBUILDNOINPROCNODE", "1");
2720
testEnvironment.
SetEnvironmentVariable
("MSBUILDDISABLENODEREUSE", "1");
2832
_env.
SetEnvironmentVariable
(env.Key, env.Value);
Microsoft.Build.Engine.OM.UnitTests (15)
Construction\ConstructionEditing_Tests.cs (1)
3224
env.
SetEnvironmentVariable
("MSBuildSDKsPath", testSdkRoot);
Definition\Project_Tests.cs (8)
3891
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
3934
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
3973
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4018
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4065
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4105
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4148
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
4193
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
Definition\ProjectItem_Tests.cs (3)
3121
env.
SetEnvironmentVariable
("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation", "non empty value");
3319
env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
3770
_env.
SetEnvironmentVariable
("MSBUILDDICTIONARYBASEDITEMREMOVETHRESHOLD", "0");
TestAssemblyInfo.cs (3)
58
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", null);
62
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", null);
132
testEnvironment.
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");
406
RunOutOfProcBuild(_ => _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)
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\ResultsCache_Tests.cs (2)
407
env.
SetEnvironmentVariable
("MSBUILDDONOTVERSIONBUILDRESULT", $"{envValue1}");
423
env.
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)
101
env.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", @"C:\Users\namytelk\Desktop");
BackEnd\TaskExecutionHost_Tests.cs (1)
1066
env.
SetEnvironmentVariable
("MSBUILDDEBUGPATH", debugFolder.Path);
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)
1709
env.
SetEnvironmentVariable
("MSBUILDUSECASESENSITIVEITEMNAMES", "1");
1793
env.
SetEnvironmentVariable
("MSBUILDUSECASESENSITIVEITEMNAMES", "1");
4576
env.
SetEnvironmentVariable
("MSBUILDLOGIMPORTS", "1");
5011
env.
SetEnvironmentVariable
("MsBuildLogPropertyTracking", envVarValue);
5014
env.
SetEnvironmentVariable
("DEFINED_ENVIRONMENT_VARIABLE", "It's Defined!");
5015
env.
SetEnvironmentVariable
("DEFINED_ENVIRONMENT_VARIABLE2", "It's also Defined!");
Evaluation\Expander_Tests.cs (4)
2591
env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
5023
env.
SetEnvironmentVariable
("MSBUILDDISABLEFEATURESFROMVERSION", ChangeWaves.Wave17_12.ToString());
5100
env.
SetEnvironmentVariable
("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1");
5130
env.
SetEnvironmentVariable
("MSBuildLogPropertyFunctionsRequiringReflection", "1");
Evaluation\ItemEvaluation_Tests.cs (3)
594
env.
SetEnvironmentVariable
("MsBuildSkipEagerWildCardEvaluationRegexes", ".*foo.*;.*yyy*.");
655
env.
SetEnvironmentVariable
("MsBuildSkipEagerWildCardEvaluationRegexes", ".*");
685
env.
SetEnvironmentVariable
("MsBuildCacheFileEnumerations", "1");
Evaluation\ProjectCollection_Tests.cs (1)
24
env.
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)
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");
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);
132
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Utilities_Tests.cs (1)
84
env.
SetEnvironmentVariable
("MSBUILDLOADALLFILESASWRITEABLE", "1");
Microsoft.Build.Framework.UnitTests (3)
TestAssemblyInfo.cs (3)
58
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", null);
62
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", null);
132
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)
58
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", null);
62
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", null);
132
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
Microsoft.Build.UnitTests.Shared (6)
ObjectModelHelpers.cs (1)
1473
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", null);
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)
58
_testEnvironment.
SetEnvironmentVariable
("VisualStudioVersion", null);
62
_testEnvironment.
SetEnvironmentVariable
("DOTNET_PERFLOG_DIR", null);
132
testEnvironment.
SetEnvironmentVariable
("DOTNET_HOST_PATH", dotnetPath);
ToolTask_Tests.cs (3)
661
env.
SetEnvironmentVariable
("PATH", $"{tempDirectory}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}");
790
testEnvironment.
SetEnvironmentVariable
(environmentVariableName, environmentVariableValue);
846
testEnvironment.
SetEnvironmentVariable
(environmentVariableName, environmentVariableValue);