302 references to SetEnvironmentVariable
Aspire.Dashboard.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
Aspire.EndToEnd.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
Aspire.Templates.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
dotnet-svcutil-lib (2)
Shared\Utilities\DebugUtils.cs (2)
19set { Environment.SetEnvironmentVariable(SvcutilKeepBootstrapDirEnvVar, value ? "1" : string.Empty); } 30set { Environment.SetEnvironmentVariable(SvcutilDebugVariableEnvVar, value.ToString(CultureInfo.InvariantCulture)); }
IdeBenchmarks (1)
Program.cs (1)
34Environment.SetEnvironmentVariable(RoslynRootPathEnvVariableName, GetRoslynRootLocation());
IdeCoreBenchmarks (1)
Program.cs (1)
42Environment.SetEnvironmentVariable(RoslynRootPathEnvVariableName, GetRoslynRootLocation());
InteractiveHost.UnitTests (1)
AbstractInteractiveHostTests.cs (1)
56Environment.SetEnvironmentVariable("DOTNET_ROOT", dir);
Microsoft.AspNetCore.Components.WebAssembly.Tests (2)
Hosting\WebAssemblyCultureProviderTest.cs (2)
31Environment.SetEnvironmentVariable("__BLAZOR_SHARDED_ICU", "1"); 47Environment.SetEnvironmentVariable("__BLAZOR_SHARDED_ICU", null);
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
BasicBlazorHybridTest.cs (1)
28Environment.SetEnvironmentVariable("PATH", newNativePath + ";" + Environment.GetEnvironmentVariable("PATH"));
Microsoft.AspNetCore.Hosting.Tests (4)
GenericWebHostBuilderTests.cs (4)
21Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, "true"); 27Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, null); 34Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, "true"); 40Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, null);
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
135Environment.SetEnvironmentVariable("REDIS_CONNECTION", $"{output}:6379");
Microsoft.Build (17)
BackEnd\Components\Communications\NodeLauncher.cs (2)
201Environment.SetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName, "0"); 209Environment.SetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName, useMSBuildServerEnvVarValue);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
1420Environment.SetEnvironmentVariable(entry.Key, null); 1438Environment.SetEnvironmentVariable(entry.Key, entry.Value);
BackEnd\Node\OutOfProcNode.cs (2)
727Environment.SetEnvironmentVariable(key, null); 734Environment.SetEnvironmentVariable(environmentPair.Key, environmentPair.Value);
CommunicationsUtilities.cs (2)
399/// Sets an environment variable using <see cref="Environment.SetEnvironmentVariable(string,string)" />. 402=> Environment.SetEnvironmentVariable(name, value);
DebugUtils.cs (1)
53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory);
Instance\ProjectInstance.cs (2)
2971Environment.SetEnvironmentVariable(environmentVariableName, null); 2984Environment.SetEnvironmentVariable(clearedVariable.Key as string, clearedVariable.Value as string);
Logging\BinaryLogger\BinaryLogger.cs (6)
170Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "true"); 171Environment.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 172Environment.SetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED", bool.TrueString); 317Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", _initialTargetOutputLogging); 318Environment.SetEnvironmentVariable("MSBUILDLOGIMPORTS", _initialLogImports ? "1" : null); 319Environment.SetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED", _initialIsBinaryLoggerEnabled);
Microsoft.Build.CommandLine.UnitTests (8)
MSBuildServer_Tests.cs (4)
154Environment.SetEnvironmentVariable("MSBUILDUSESERVER", ""); 161Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 212Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "0"); 218Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "1");
XMake_Tests.cs (4)
631Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", oldValueForMSBuildLoadMicrosoftTargetsReadOnly); 1105Environment.SetEnvironmentVariable("MyEnvVariable", "1"); 1119Environment.SetEnvironmentVariable("MyEnvVariable", null); 1180Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", oldValueForMSBuildLoadMicrosoftTargetsReadOnly);
Microsoft.Build.Engine.OM.UnitTests (9)
DebugUtils.cs (1)
53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory);
Definition\Project_Tests.cs (8)
1230Environment.SetEnvironmentVariable("VisualStudioVersion", null); 1245Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 1260Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCD"); 1271Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 1285Environment.SetEnvironmentVariable("VisualStudioVersion", null); 1299Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 1314Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 1331Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Microsoft.Build.Engine.UnitTests (146)
BackEnd\BuildRequestConfiguration_Tests.cs (6)
370Environment.SetEnvironmentVariable("MSBUILDCACHE", "1"); 417Environment.SetEnvironmentVariable("MSBUILDCACHE", originalValue); 475Environment.SetEnvironmentVariable("TMP", problematicTmpPath); 476Environment.SetEnvironmentVariable("TEMP", problematicTmpPath); 485Environment.SetEnvironmentVariable("TMP", originalTmp); 486Environment.SetEnvironmentVariable("TEMP", originalTemp);
BackEnd\NodePackets_Tests.cs (2)
258Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "1"); 349Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", _initialTargetOutputLogging);
BackEnd\SdkResolverLoader_Tests.cs (4)
340Environment.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", "false"); 354Environment.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", origIncludeDefault); 385Environment.SetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER", additionalRoot); 394Environment.SetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER", origResolversFolder);
BackEnd\TargetEntry_Tests.cs (4)
672Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "1"); 755Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", loggingVariable); 768Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", null); 822Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", loggingVariable);
BackEnd\TargetResult_Tests.cs (3)
138Environment.SetEnvironmentVariable("TMP", "C:\\}"); 141Environment.SetEnvironmentVariable("TMP", "C:\\{"); 146Environment.SetEnvironmentVariable("TMP", oldTmp);
Construction\SolutionProjectGenerator_Tests.cs (10)
54Environment.SetEnvironmentVariable("VisualStudioVersion", _originalVisualStudioVersion); 299Environment.SetEnvironmentVariable("MSBuildSolutionBatchTargets", "1"); 311Environment.SetEnvironmentVariable("MSBuildSolutionBatchTargets", null); 458Environment.SetEnvironmentVariable("VisualStudioVersion", null); 502Environment.SetEnvironmentVariable("VisualStudioVersion", null); 543Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 665Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 710Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", previousLegacyEnvironmentVariable); 2017Environment.SetEnvironmentVariable("MSBuildEmitSolution", "1"); 2036Environment.SetEnvironmentVariable("MSBuildEmitSolution", oldValueForMSBuildEmitSolution);
Definition\Project_Internal_Tests.cs (8)
38Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 61Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 82Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 101Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 129Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 144Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 180Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 200Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue);
Definition\Toolset_Tests.cs (22)
194Environment.SetEnvironmentVariable("VisualStudioVersion", null); 212Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 228Environment.SetEnvironmentVariable("VisualStudioVersion", null); 248Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 259Environment.SetEnvironmentVariable("VisualStudioVersion", null); 273Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 284Environment.SetEnvironmentVariable("VisualStudioVersion", "foo"); 295Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 306Environment.SetEnvironmentVariable("VisualStudioVersion", null); 320Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 331Environment.SetEnvironmentVariable("VisualStudioVersion", "foo"); 348Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 359Environment.SetEnvironmentVariable("VisualStudioVersion", null); 370Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 381Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 389Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 400Environment.SetEnvironmentVariable("VisualStudioVersion", null); 411Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 422Environment.SetEnvironmentVariable("VisualStudioVersion", null); 436Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 447Environment.SetEnvironmentVariable("VisualStudioVersion", ObjectModelHelpers.CurrentVisualStudioVersion); 464Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Definition\ToolsVersion_Tests.cs (28)
297Environment.SetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT", "1"); 298Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 322Environment.SetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT", oldTreatHigherToolsVersions); 323Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 335Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 359Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 371Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 394Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 432Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 433Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 456Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 457Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 540Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 563Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 579Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 602Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 619Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 620Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 644Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 645Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 690Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 715Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 775Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 776Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 800Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 801Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 887Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 911Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion);
Evaluation\Evaluator_Tests.cs (47)
587Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 602Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 631Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", null); 647Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 675Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 690Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 721Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 736Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 2471Environment.SetEnvironmentVariable(specialPropertyName, null); 2472Environment.SetEnvironmentVariable(specialPropertyName32, null); 2473Environment.SetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH", null); 2484Environment.SetEnvironmentVariable(specialPropertyName, backupMSBuildExtensionsPath); 2485Environment.SetEnvironmentVariable(specialPropertyName32, backupMSBuildExtensionsPath32); 2486Environment.SetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH", backupMagicSwitch); 2487Environment.SetEnvironmentVariable("Target", targetVar); 2488Environment.SetEnvironmentVariable("0env", numberVar); 2489Environment.SetEnvironmentVariable("msbuildtoolsversion", msbuildVar); 2507Environment.SetEnvironmentVariable("MSBuildExtensionsPath", @"c:\foo\bar"); 2517Environment.SetEnvironmentVariable("MSBuildExtensionsPath", backupMSBuildExtensionsPath); 2585Environment.SetEnvironmentVariable("MSBuildExtensionsPath32", @"c:\devdiv\vscore\msbuild"); 2594Environment.SetEnvironmentVariable("MSBuildExtensionsPath32", originalMSBuildExtensionsPath32Value); 2660Environment.SetEnvironmentVariable("MSBuildExtensionsPath64", @"c:\devdiv\vscore\msbuild"); 2669Environment.SetEnvironmentVariable("MSBuildExtensionsPath64", originalMSBuildExtensionsPath64Value); 2717Environment.SetEnvironmentVariable("LocalAppData", @"c:\AppData\Local"); 2726Environment.SetEnvironmentVariable("LocalAppData", originalLocalAppDataValue); 3112Environment.SetEnvironmentVariable("EnvironmentProperty", "Bar;Baz"); 3148Environment.SetEnvironmentVariable("EnvironmentProperty", oldEnvironmentValue); 3867Environment.SetEnvironmentVariable("VisualStudioVersion", null); 3919Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3933Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCDE"); 3972Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3985Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4024Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4037Environment.SetEnvironmentVariable("VisualStudioVersion", "abcdef"); 4076Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4092Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4093Environment.SetEnvironmentVariable("C", "c4"); // not explosive :) 4094Environment.SetEnvironmentVariable("D", "d4"); 4136Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4137Environment.SetEnvironmentVariable("C", originalC); 4138Environment.SetEnvironmentVariable("D", originalD); 4152Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4199Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4213Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4257Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4364Environment.SetEnvironmentVariable("VisualStudioVersion", null); 4377Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Evaluation\Expander_Tests.cs (4)
2624Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 2634Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", env); 2653Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 2665Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", env);
Instance\ProjectInstance_Internal_Tests.cs (8)
319Environment.SetEnvironmentVariable("VisualStudioVersion", null); 338Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 353Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCD"); 364Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 378Environment.SetEnvironmentVariable("VisualStudioVersion", null); 392Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 407Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 433Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Microsoft.Build.Tasks.Core (1)
DebugUtils.cs (1)
53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory);
Microsoft.Build.Tasks.UnitTests (50)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
179Environment.SetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE", "1"); 186Environment.SetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE", null);
Copy_Tests.cs (8)
108Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, null); 109Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, null); 119Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, _alwaysOverwriteReadOnlyFiles); 120Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, _alwaysRetry); 760Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, "1 "); 804Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, oldAlwaysOverwriteValue); 826Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, "1 "); 873Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, oldAlwaysRetryValue);
Exec_Tests.cs (10)
349Environment.SetEnvironmentVariable("TMP", newTmp); 357Environment.SetEnvironmentVariable("TMP", oldTmp); 386Environment.SetEnvironmentVariable("TMP", newTmp); 395Environment.SetEnvironmentVariable("TMP", oldTmp); 424Environment.SetEnvironmentVariable("TMP", newTmp); 432Environment.SetEnvironmentVariable("TMP", oldTmp); 461Environment.SetEnvironmentVariable("TMP", newTmp); 469Environment.SetEnvironmentVariable("TMP", oldTmp); 867Environment.SetEnvironmentVariable("errorlevel", "1"); 874Environment.SetEnvironmentVariable("errorlevel", oldValue);
GetInstalledSDKLocations_Tests.cs (10)
273Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", _fakeSDKStructureRoot + ";" + _fakeSDKStructureRoot2); 274Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 307Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 308Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 320Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", _fakeSDKStructureRoot + ";" + _fakeSDKStructureRoot2); 321Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 381Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 382Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 394Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 455Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
ResolveSDKReference_Tests.cs (20)
3765Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3766Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3834Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3835Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3906Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3907Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3977Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3978Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4028Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4029Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4086Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4087Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4133Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4134Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4185Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4186Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4272Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4273Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4317Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4318Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
Microsoft.Build.UnitTests.Shared (10)
TestEnvironment.cs (10)
579Environment.SetEnvironmentVariable(key, tempPath); 591Environment.SetEnvironmentVariable(key, tempPaths[key]); 661Environment.SetEnvironmentVariable("MSBuildDebugEngine", "1"); 662Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", FileUtilities.TempFileDirectory); 666Environment.SetEnvironmentVariable("MSBuildDebugEngine", null); 667Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", null); 673Environment.SetEnvironmentVariable("MSBuildDebugEngine", _previousDebugEngineEnv); 674Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", _previousDebugPath); 772Environment.SetEnvironmentVariable(environmentVariableName, newValue); 777Environment.SetEnvironmentVariable(_environmentVariableName, _originalValue);
Microsoft.Build.Utilities.Core (1)
DebugUtils.cs (1)
53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory);
Microsoft.Build.Utilities.UnitTests (16)
ToolLocationHelper_Tests.cs (16)
2990Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3015Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3027Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3061Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3479Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "True"); 3510Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3523Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "True"); 3536Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3568Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3569Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3600Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3601Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3642Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3670Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4054Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4083Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
TelemetryReporterTests.cs (1)
26Environment.SetEnvironmentVariable("CommonPropertyBagPath", Path.GetTempFileName());
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\BrokeredServiceBase.cs (1)
212Environment.SetEnvironmentVariable("MICROSOFT_DIASYMREADER_NATIVE_ALT_LOAD_PATH", loadDir);
Microsoft.ML.Core.Tests (6)
UnitTests\TestResourceDownload.cs (6)
32Environment.SetEnvironmentVariable(Utils.CustomSearchDirEnvVariable, null); 46Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, badUri.AbsoluteUri); 75Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, cnn.AbsoluteUri); 102Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, envVarOld); 137Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, envVarOld); 138Environment.SetEnvironmentVariable(Utils.CustomSearchDirEnvVariable, resourcePathVarOld);
Microsoft.ML.OneDal (1)
OneDalUtils.cs (1)
35Environment.SetEnvironmentVariable("PATH", nativeLibs + ";" + originalPath);
Microsoft.ML.TensorFlow.Tests (2)
TensorflowTests.cs (2)
83Environment.SetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable, (3 * 60 * 1000).ToString()); 89Environment.SetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable, _timeOutOldValue);
Microsoft.ML.TestFramework (1)
GlobalBase.cs (1)
34Environment.SetEnvironmentVariable("MKL_CBWR", "COMPATIBLE");
Microsoft.ML.Tests (1)
TrainerEstimators\OneDalEstimators.cs (1)
36Environment.SetEnvironmentVariable("MLNET_BACKEND", "ONEDAL");
MSBuild (5)
CommunicationsUtilities.cs (1)
402=> Environment.SetEnvironmentVariable(name, value);
DebugUtils.cs (1)
53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory);
XMake.cs (3)
666Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", "true"); 814Environment.SetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE", "1"); 2559Environment.SetEnvironmentVariable("_MSBUILDTLENABLED", useTerminalLogger ? "1" : "0");
RunTests (1)
HelixTestRunner.cs (1)
379Environment.SetEnvironmentVariable(name, defaultValue);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Environment.cs (1)
106SetEnvironmentVariable(variable, value);
Templates.Blazor.Tests (2)
BlazorTemplateTest.cs (1)
33Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
Templates.Tests (1)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
VBCSCompiler.UnitTests (2)
CompilerServerTests.cs (2)
135Environment.SetEnvironmentVariable(variable.Key, variable.Value); 144Environment.SetEnvironmentVariable(variable.Key, variable.Value);