diff --git a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs index f9f56c943..dc3b92b97 100644 --- a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs +++ b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs @@ -15,6 +15,7 @@ using Microsoft.DotNet.Tools.Common; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Tools.Migrate; using Build3Command = Microsoft.DotNet.Tools.Test.Utilities.Build3Command; +using BuildCommand = Microsoft.DotNet.Tools.Test.Utilities.BuildCommand; namespace Microsoft.DotNet.Migration.Tests { @@ -113,13 +114,7 @@ namespace Microsoft.DotNet.Migration.Tests [Fact] public void It_migrates_an_app_with_scripts_and_the_scripts_run() - { - var oldPathExt = Environment.GetEnvironmentVariable("PATHEXT"); - if (oldPathExt != null) - { - Environment.SetEnvironmentVariable("PATHEXT", ".cmd"); - } - + { var projectDirectory = TestAssetsManager.CreateTestInstance("TestAppWithMigrateableScripts", callingMethod: "i").WithLockFiles().Path; @@ -142,11 +137,6 @@ namespace Microsoft.DotNet.Migration.Tests msBuildStdOut.Should().Contain($"precompile_output ?Debug? ?{outputDir}? ?.NETCoreApp,Version=v1.0?"); msBuildStdOut.Should().Contain($"postcompile_output ?Debug? ?{outputDir}? ?.NETCoreApp,Version=v1.0?"); - - if (oldPathExt != null) - { - Environment.SetEnvironmentVariable("PATHEXT", oldPathExt); - } } private MigratedBuildComparisonData GetDotnetNewComparisonData(string projectDirectory, string dotnetNewType)