diff --git a/azure-pipelines-integration.yml b/azure-pipelines-integration.yml index 729e38006b..fd7b7139bc 100644 --- a/azure-pipelines-integration.yml +++ b/azure-pipelines-integration.yml @@ -50,6 +50,12 @@ jobs: _sha: "9099ad2f6e5936ecdf549f88394b5a59fa75c869" timeoutInMinutes: 20 steps: + - task: UseDotNet@2 + displayName: 'Install .NET Core SDK 3.1.300' + inputs: + packageType: 'sdk' + version: '3.1.300' + - script: eng\integration-test.cmd -repo '$(_repo)' -sha '$(_sha)' -testPath '$(Build.SourcesDirectory)\temp' -stage 'prepare' displayName: Prepare $(_repoName) for formatting diff --git a/eng/format-verifier.ps1 b/eng/format-verifier.ps1 index 1b76388f4b..738c47da3f 100644 --- a/eng/format-verifier.ps1 +++ b/eng/format-verifier.ps1 @@ -39,6 +39,11 @@ try { .\eng\common\Build.ps1 -restore } + if ($stage -eq "format-folder" -or $stage -eq "format-workspace") { + Write-Output "$(Get-Date) - Running dotnet-format Build.ps1 -restore" + iex "$currentLocation\eng\common\Build.ps1 -restore" + } + if ($stage -eq "prepare" -or $stage -eq "format-workspace") { Write-Output "$(Get-Date) - Finding solutions." $solutions = Get-ChildItem -Filter *.sln -Recurse -Depth 2 | Select-Object -ExpandProperty FullName | Where-Object { $_ -match '.sln$' } diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 deleted file mode 100644 index b501caa87c..0000000000 --- a/eng/restore-toolset.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -function InitializeCustomSDKToolset { - if (-not $restore) { - return - } - - # Turn off MSBuild Node re-use - $env:MSBUILDDISABLENODEREUSE=1 - - # Workaround for the sockets issue when restoring with many nuget feeds. - $env:DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 - - # Enable vs test console logging - $env:VSTEST_BUILD_TRACE=1 - $env:VSTEST_TRACE_BUILD=1 - - $env:DOTNET_CLI_TELEMETRY_PROFILE='$env:DOTNET_CLI_TELEMETRY_PROFILE;https://github.com/dotnet/format' - - $cli = InitializeDotnetCli -install:$true - InstallDotNetSharedFramework "3.1.4" - } - - function InstallDotNetSharedFramework([string]$version) { - $dotnetRoot = $env:DOTNET_INSTALL_DIR - $fxDir = Join-Path $dotnetRoot "shared\Microsoft.NETCore.App\$version" - - if (!(Test-Path $fxDir)) { - $installScript = GetDotNetInstallScript $dotnetRoot - & $installScript -Version $version -InstallDir $dotnetRoot -Runtime "dotnet" - - if($lastExitCode -ne 0) { - Write-Output "Failed to install Shared Framework $version. Ignoring failure as not all distros carrie all versions of the framework." - } - } - } - - InitializeCustomSDKToolset \ No newline at end of file