Update to net50 and fix warnings (#2424)

This commit is contained in:
James Newton-King
2020-11-20 16:35:24 +13:00
committed by GitHub
parent 666d976071
commit a222c8b69c
27 changed files with 86 additions and 64 deletions
+10 -4
View File
@@ -14,8 +14,9 @@
$workingName = if ($workingName) {$workingName} else {"Working"}
$assemblyVersion = if ($assemblyVersion) {$assemblyVersion} else {$majorVersion + '.0.0'}
$netCliChannel = "Current"
$netCliVersion = "3.0.100"
$netCliVersion = "5.0.100"
$nugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$ensureNetCliSdk = $true
$baseDir = resolve-path ..
$buildDir = "$baseDir\Build"
@@ -31,8 +32,8 @@
$nunitConsolePath = "$buildDir\Temp\NUnit.ConsoleRunner.$nunitConsoleVersion"
$builds = @(
@{Framework = "netstandard2.0"; TestsFunction = "NetCliTests"; TestFramework = "netcoreapp3.0"; Enabled=$true},
@{Framework = "netstandard1.3"; TestsFunction = "NetCliTests"; TestFramework = "netcoreapp2.2"; Enabled=$true},
@{Framework = "netstandard2.0"; TestsFunction = "NetCliTests"; TestFramework = "net5.0"; Enabled=$true},
@{Framework = "netstandard1.3"; TestsFunction = "NetCliTests"; TestFramework = "netcoreapp3.1"; Enabled=$true},
@{Framework = "netstandard1.0"; TestsFunction = "NetCliTests"; TestFramework = "netcoreapp2.1"; Enabled=$true},
@{Framework = "net45"; TestsFunction = "NUnitTests"; TestFramework = "net46"; NUnitFramework="net-4.0"; Enabled=$true},
@{Framework = "net40"; TestsFunction = "NUnitTests"; NUnitFramework="net-4.0"; Enabled=$true},
@@ -69,7 +70,10 @@ task Build -depends Clean {
mkdir "$buildDir\Temp" -Force
EnsureDotNetCli
if ($ensureNetCliSdk)
{
EnsureDotNetCli
}
EnsureNuGetExists
EnsureNuGetPackage "vswhere" $vswherePath $vswhereVersion
EnsureNuGetPackage "NUnit.ConsoleRunner" $nunitConsolePath $nunitConsoleVersion
@@ -170,6 +174,8 @@ function EnsureDotnetCli()
-OutFile "$buildDir\Temp\dotnet-install.ps1"
exec { & $buildDir\Temp\dotnet-install.ps1 -Channel $netCliChannel -Version $netCliVersion | Out-Default }
exec { & $buildDir\Temp\dotnet-install.ps1 -Channel $netCliChannel -Version '3.1.402' | Out-Default }
exec { & $buildDir\Temp\dotnet-install.ps1 -Channel $netCliChannel -Version '2.1.811' | Out-Default }
}
function EnsureNuGetExists()