File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,8 +281,16 @@ private static BuildScript DownloadDotNetVersion(IBuildActions actions, ILogger
281281 {
282282 var psCommand = $ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version { version } -InstallDir { path } ";
283283
284+ var environment = new Dictionary < string , string >
285+ {
286+ // From .NET 11 and onwards, the installation script uses tar by default, which we want to skip on Windows.
287+ // We still want to download the .zip archive. Otherwise an error occur in https://dot.net/v1/dotnet-install.ps1
288+ // when the archive is extracted.
289+ // We might be able to remove this restriction in the future.
290+ { "DOTNET_INSTALL_SKIP_TAR" , "1" }
291+ } ;
284292 BuildScript GetInstall ( string pwsh ) =>
285- new CommandBuilder ( actions ) .
293+ new CommandBuilder ( actions , environment : environment ) .
286294 RunCommand ( pwsh ) .
287295 Argument ( "-NoProfile" ) .
288296 Argument ( "-ExecutionPolicy" ) .
You can’t perform that action at this time.
0 commit comments