@@ -363,6 +363,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
363
363
Targets related to creating .zip/.tar.gz
364
364
#########################################
365
365
-->
366
+
367
+ <PropertyGroup >
368
+ <TarCommand Condition =" '$(OS)' == 'Windows_NT'" >C:\Windows\System32\tar</TarCommand >
369
+ <TarCommand Condition =" '$(OS)' != 'Windows_NT'" >tar</TarCommand >
370
+ </PropertyGroup >
371
+
366
372
<Target Name =" _DownloadAndExtractDotNetRuntime" Condition =" '$(DotNetBuildFromSource)' != 'true'" >
367
373
<DownloadFile Condition =" ! Exists('$(DotNetRuntimeArchive)')"
368
374
SourceUrl =" $(DotNetRuntimeDownloadUrl)$(DotNetAssetRootAccessTokenSuffix)"
@@ -371,7 +377,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
371
377
372
378
<!-- Extract the dotnet-runtime archive -->
373
379
<Exec Condition =" '$(ArchiveExtension)' == '.tar.gz'"
374
- Command =" C:\Windows\System32\tar -xzf $(DotNetRuntimeArchive) -C $(RedistSharedFrameworkLayoutRoot)" />
380
+ Command =" $(TarCommand) -xzf $(DotNetRuntimeArchive) -C $(RedistSharedFrameworkLayoutRoot)" />
375
381
376
382
<Unzip Condition =" '$(ArchiveExtension)' == '.zip'"
377
383
SourceFiles =" $(DotNetRuntimeArchive)"
@@ -436,7 +442,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
436
442
Overwrite =" true"
437
443
Condition =" '$(ArchiveExtension)' == '.zip'" />
438
444
<Exec
439
- Command =" C:\Windows\System32\tar -czf $(InternalArchiveOutputPath) ."
445
+ Command =" $(TarCommand) -czf $(InternalArchiveOutputPath) ."
440
446
WorkingDirectory =" $(SharedFrameworkLayoutRoot)"
441
447
Condition =" '$(ArchiveExtension)' == '.tar.gz'" />
442
448
</Target >
@@ -453,7 +459,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
453
459
Overwrite =" true"
454
460
Condition =" '$(ArchiveExtension)' == '.zip'" />
455
461
<Exec
456
- Command =" C:\Windows\System32\tar -czf $(RedistArchiveOutputPath) ."
462
+ Command =" $(TarCommand) -czf $(RedistArchiveOutputPath) ."
457
463
WorkingDirectory =" $(RedistSharedFrameworkLayoutRoot)"
458
464
Condition =" '$(ArchiveExtension)' == '.tar.gz'" />
459
465
</Target >
0 commit comments