@@ -981,8 +981,7 @@ public void TestDotnetVersionWindows()
981981 {
982982 actions . RunProcess [ "cmd.exe /C dotnet --list-sdks" ] = 0 ;
983983 actions . RunProcessOut [ "cmd.exe /C dotnet --list-sdks" ] = "2.1.3 [C:\\ Program Files\\ dotnet\\ sdks]\n 2.1.4 [C:\\ Program Files\\ dotnet\\ sdks]" ;
984- actions . RunProcess [ @"cmd.exe /C pwsh -NoProfile -ExecutionPolicy unrestricted -file C:\Project\install-dotnet.ps1 -Version 2.1.3 -InstallDir C:\Project\.dotnet" ] = 0 ;
985- actions . RunProcess [ @"cmd.exe /C del C:\Project\install-dotnet.ps1" ] = 0 ;
984+ actions . RunProcess [ @"cmd.exe /C pwsh -NoProfile -ExecutionPolicy unrestricted -Command ""[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 2.1.3 -InstallDir C:\Project\.dotnet""" ] = 0 ;
986985 actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet --info" ] = 0 ;
987986 actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet clean C:\Project\test.csproj" ] = 0 ;
988987 actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet restore C:\Project\test.csproj" ] = 0 ;
@@ -1005,17 +1004,16 @@ public void TestDotnetVersionWindows()
10051004 actions . LoadXml [ @"C:\Project\test.csproj" ] = xml ;
10061005
10071006 var autobuilder = CreateAutoBuilder ( true , dotnetVersion : "2.1.3" ) ;
1008- TestAutobuilderScript ( autobuilder , 0 , 7 ) ;
1007+ TestAutobuilderScript ( autobuilder , 0 , 6 ) ;
10091008 }
10101009
10111010 [ Fact ]
10121011 public void TestDotnetVersionWindowsNoPwsh ( )
10131012 {
10141013 actions . RunProcess [ "cmd.exe /C dotnet --list-sdks" ] = 0 ;
10151014 actions . RunProcessOut [ "cmd.exe /C dotnet --list-sdks" ] = "2.1.3 [C:\\ Program Files\\ dotnet\\ sdks]\n 2.1.4 [C:\\ Program Files\\ dotnet\\ sdks]" ;
1016- actions . RunProcess [ @"cmd.exe /C pwsh -NoProfile -ExecutionPolicy unrestricted -file C:\Project\install-dotnet.ps1 -Version 2.1.3 -InstallDir C:\Project\.dotnet" ] = 1 ;
1017- actions . RunProcess [ @"cmd.exe /C powershell -NoProfile -ExecutionPolicy unrestricted -file C:\Project\install-dotnet.ps1 -Version 2.1.3 -InstallDir C:\Project\.dotnet" ] = 0 ;
1018- actions . RunProcess [ @"cmd.exe /C del C:\Project\install-dotnet.ps1" ] = 0 ;
1015+ actions . RunProcess [ @"cmd.exe /C pwsh -NoProfile -ExecutionPolicy unrestricted -Command ""[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 2.1.3 -InstallDir C:\Project\.dotnet""" ] = 1 ;
1016+ actions . RunProcess [ @"cmd.exe /C powershell -NoProfile -ExecutionPolicy unrestricted -Command ""[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 2.1.3 -InstallDir C:\Project\.dotnet""" ] = 0 ;
10191017 actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet --info" ] = 0 ;
10201018 actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet clean C:\Project\test.csproj" ] = 0 ;
10211019 actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet restore C:\Project\test.csproj" ] = 0 ;
@@ -1038,7 +1036,7 @@ public void TestDotnetVersionWindowsNoPwsh()
10381036 actions . LoadXml [ @"C:\Project\test.csproj" ] = xml ;
10391037
10401038 var autobuilder = CreateAutoBuilder ( true , dotnetVersion : "2.1.3" ) ;
1041- TestAutobuilderScript ( autobuilder , 0 , 8 ) ;
1039+ TestAutobuilderScript ( autobuilder , 0 , 7 ) ;
10421040 }
10431041
10441042 [ Fact ]
0 commit comments