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,15 @@ 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+ // Starting with .NET 11, the installation script uses tar by default. However,
287+ // tar extraction fails in dotnet-install.ps1, so force the script to download
288+ // and extract the ZIP archive instead. This workaround may be removable in the future.
289+ { "DOTNET_INSTALL_SKIP_TAR" , "1" }
290+ } ;
284291 BuildScript GetInstall ( string pwsh ) =>
285- new CommandBuilder ( actions ) .
292+ new CommandBuilder ( actions , environment : environment ) .
286293 RunCommand ( pwsh ) .
287294 Argument ( "-NoProfile" ) .
288295 Argument ( "-ExecutionPolicy" ) .
You can’t perform that action at this time.
0 commit comments