@@ -981,8 +981,7 @@ public void TestDotnetVersionWindows()
981
981
{
982
982
actions . RunProcess [ "cmd.exe /C dotnet --list-sdks" ] = 0 ;
983
983
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 ;
986
985
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet --info" ] = 0 ;
987
986
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet clean C:\Project\test.csproj" ] = 0 ;
988
987
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet restore C:\Project\test.csproj" ] = 0 ;
@@ -1005,17 +1004,16 @@ public void TestDotnetVersionWindows()
1005
1004
actions . LoadXml [ @"C:\Project\test.csproj" ] = xml ;
1006
1005
1007
1006
var autobuilder = CreateAutoBuilder ( true , dotnetVersion : "2.1.3" ) ;
1008
- TestAutobuilderScript ( autobuilder , 0 , 7 ) ;
1007
+ TestAutobuilderScript ( autobuilder , 0 , 6 ) ;
1009
1008
}
1010
1009
1011
1010
[ Fact ]
1012
1011
public void TestDotnetVersionWindowsNoPwsh ( )
1013
1012
{
1014
1013
actions . RunProcess [ "cmd.exe /C dotnet --list-sdks" ] = 0 ;
1015
1014
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 ;
1019
1017
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet --info" ] = 0 ;
1020
1018
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet clean C:\Project\test.csproj" ] = 0 ;
1021
1019
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet restore C:\Project\test.csproj" ] = 0 ;
@@ -1038,7 +1036,7 @@ public void TestDotnetVersionWindowsNoPwsh()
1038
1036
actions . LoadXml [ @"C:\Project\test.csproj" ] = xml ;
1039
1037
1040
1038
var autobuilder = CreateAutoBuilder ( true , dotnetVersion : "2.1.3" ) ;
1041
- TestAutobuilderScript ( autobuilder , 0 , 8 ) ;
1039
+ TestAutobuilderScript ( autobuilder , 0 , 7 ) ;
1042
1040
}
1043
1041
1044
1042
[ Fact ]
0 commit comments