Skip to content

Commit 8599521

Browse files
committed
!fixups!
- don't try internal download location in public builds - use two targets to make Product.targets more readable
1 parent 2dea6cd commit 8599521

File tree

2 files changed

+31
-42
lines changed

2 files changed

+31
-42
lines changed

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
506506
<ItemGroup>
507507
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/$(DotNetRuntimeDownloadPath)" />
508508
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(DotNetRuntimeDownloadPath)" />
509-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(DotNetRuntimeDownloadPath)">
509+
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(DotNetRuntimeDownloadPath)"
510+
Condition=" '$(DotnetRuntimeSourceFeedKey)' != '' ">
510511
<token>$(DotnetRuntimeSourceFeedKey)</token>
511512
</UrisToDownload>
512513
</ItemGroup>

src/Installers/Windows/WindowsHostingBundle/Product.targets

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,61 +25,49 @@
2525
</RuntimeInstallers>
2626
</ItemGroup>
2727

28-
<Target Name="FetchDependencies" BeforeTargets="Restore;CollectPackageReferences">
28+
<!--
29+
Runs before FetchDependencies but can't be depended up because this sets up the item group that target
30+
uses for batching.
31+
-->
32+
<Target Name="CollectDependencies" BeforeTargets="Restore;CollectPackageReferences">
2933
<!-- Use the BrowserDebugHost as a sentinel for the nonshipping version for NETCoreApp. -->
30-
<PropertyGroup>
31-
<x64RemoteAsset>Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</x64RemoteAsset>
32-
<x64RemoteAssetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</x64RemoteAssetFileName>
33-
<x86RemoteAsset>Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</x86RemoteAsset>
34-
<x86RemoteAssetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</x86RemoteAssetFileName>
35-
<arm64RemoteAsset>Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</arm64RemoteAsset>
36-
<arm64RemoteAssetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</arm64RemoteAssetFileName>
37-
</PropertyGroup>
38-
39-
<MakeDir Directories="$(DepsPath)" />
40-
41-
<!-- Try various places to find the installers. It's either released (use official version),
42-
public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) -->
43-
<ItemGroup>
44-
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/$(x64RemoteAsset)" />
45-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(x64RemoteAsset)" />
46-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(x64RemoteAsset)">
47-
<token>$(DotnetRuntimeSourceFeedKey)</token>
48-
</UrisToDownload>
49-
</ItemGroup>
50-
51-
<DownloadFile Condition=" ! Exists('$(DepsPath)$(x64RemoteAssetFileName)') "
52-
Uris="@(UrisToDownload)"
53-
DestinationPath="$(DepsPath)$(x64RemoteAssetFileName)" />
54-
5534
<ItemGroup>
56-
<UrisToDownload Remove="@(UrisToDownload)" />
57-
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/$(x86RemoteAsset)" />
58-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(x86RemoteAsset)" />
59-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(x86RemoteAsset)">
60-
<token>$(DotnetRuntimeSourceFeedKey)</token>
61-
</UrisToDownload>
35+
<RemoteAsset Include="$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe">
36+
<TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</TargetFileName>
37+
</RemoteAsset>
38+
<RemoteAsset Include="$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe">
39+
<TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</TargetFileName>
40+
</RemoteAsset>
41+
<RemoteAsset Include="$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe">
42+
<TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</TargetFileName>
43+
</RemoteAsset>
6244
</ItemGroup>
6345

64-
<DownloadFile Condition=" ! Exists('$(DepsPath)$(x86RemoteAssetFileName)') "
65-
Uris="@(UrisToDownload)"
66-
DestinationPath="$(DepsPath)$(x86RemoteAssetFileName)" />
46+
<MakeDir Directories="$(DepsPath)" />
47+
</Target>
6748

49+
<Target Name="FetchDependencies" BeforeTargets="Restore;CollectPackageReferences"
50+
Outputs="$(DepsPath)%(RemoteAsset.TargetFilename)">
51+
<!--
52+
Try various places to find the runtime. It's either released (use official version), public but
53+
unreleased (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal).
54+
-->
6855
<ItemGroup>
6956
<UrisToDownload Remove="@(UrisToDownload)" />
70-
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/$(arm64RemoteAsset)" />
71-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(arm64RemoteAsset)" />
72-
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(arm64RemoteAsset)">
57+
<UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/%(RemoteAsset.Identity)" />
58+
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/Runtime/%(RemoteAsset.Identity)" />
59+
<UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/Runtime/%(RemoteAsset.Identity)"
60+
Condition=" '$(DotnetRuntimeSourceFeedKey)' != '' ">
7361
<token>$(DotnetRuntimeSourceFeedKey)</token>
7462
</UrisToDownload>
7563
</ItemGroup>
7664

77-
<DownloadFile Condition=" ! Exists('$(DepsPath)$(arm64RemoteAssetFileName)') "
65+
<DownloadFile Condition=" ! Exists('$(DepsPath)%(RemoteAsset.TargetFilename)') "
7866
Uris="@(UrisToDownload)"
79-
DestinationPath="$(DepsPath)$(arm64RemoteAssetFileName)" />
67+
DestinationPath="$(DepsPath)%(RemoteAsset.TargetFilename)" />
8068
</Target>
8169

82-
<Target Name="ExtractPropertiesFromDotNetMsi" DependsOnTargets="FetchDependencies" BeforeTargets="BeforeBuild">
70+
<Target Name="ExtractPropertiesFromDotNetMsi" DependsOnTargets="CollectDependencies;FetchDependencies" BeforeTargets="BeforeBuild">
8371
<!-- Create properties that holds the executable name. These are passed to the bundles so we can reference them as variables
8472
from inside the ExePackage authoring. -->
8573
<CreateProperty Value="%(RuntimeInstallers.Filename)%(Extension)">

0 commit comments

Comments
 (0)