Skip to content

Commit 2dea6cd

Browse files
committed
Use Arcade's DownloadFile in Windows hosting bundle
- was still trying to use our version
1 parent ada3d82 commit 2dea6cd

File tree

1 file changed

+44
-20
lines changed

1 file changed

+44
-20
lines changed

src/Installers/Windows/WindowsHostingBundle/Product.targets

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,57 @@
2626
</ItemGroup>
2727

2828
<Target Name="FetchDependencies" BeforeTargets="Restore;CollectPackageReferences">
29+
<!-- Use the BrowserDebugHost as a sentinel for the nonshipping version for NETCoreApp. -->
2930
<PropertyGroup>
30-
<DotNetAssetRootUrl Condition=" '$(DotNetAssetRootUrl)' == '' ">https://dotnetcli.azureedge.net/dotnet/</DotNetAssetRootUrl>
31-
<DotNetAssetRootUrl Condition=" ! $(DotNetAssetRootUrl.EndsWith('/'))">$(DotNetAssetRootUrl)/</DotNetAssetRootUrl>
32-
<DotNetPrivateAssetRootUrl Condition=" '$(DotNetPrivateAssetRootUrl)' == '' ">https://dotnetclimsrc.azureedge.net/dotnet/</DotNetPrivateAssetRootUrl>
33-
<DotNetPrivateAssetRootUrl Condition=" ! $(DotNetPrivateAssetRootUrl.EndsWith('/'))">$(DotNetPrivateAssetRootUrl)/</DotNetPrivateAssetRootUrl>
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>
3437
</PropertyGroup>
3538

36-
<!-- Use the BrowserDebugHost as a sentinel for the nonshipping version for NETCoreApp. -->
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) -->
3743
<ItemGroup>
38-
<RemoteAsset Include="Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe">
39-
<TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</TargetFileName>
40-
</RemoteAsset>
41-
<RemoteAsset Include="Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe">
42-
<TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</TargetFileName>
43-
</RemoteAsset>
44-
<RemoteAsset Include="Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe">
45-
<TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</TargetFileName>
46-
</RemoteAsset>
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>
4749
</ItemGroup>
4850

49-
<MakeDir Directories="$(DepsPath)" />
51+
<DownloadFile Condition=" ! Exists('$(DepsPath)$(x64RemoteAssetFileName)') "
52+
Uris="@(UrisToDownload)"
53+
DestinationPath="$(DepsPath)$(x64RemoteAssetFileName)" />
54+
55+
<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>
62+
</ItemGroup>
63+
64+
<DownloadFile Condition=" ! Exists('$(DepsPath)$(x86RemoteAssetFileName)') "
65+
Uris="@(UrisToDownload)"
66+
DestinationPath="$(DepsPath)$(x86RemoteAssetFileName)" />
67+
68+
<ItemGroup>
69+
<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)">
73+
<token>$(DotnetRuntimeSourceFeedKey)</token>
74+
</UrisToDownload>
75+
</ItemGroup>
5076

51-
<DownloadFile Condition=" ! Exists('$(DepsPath)%(RemoteAsset.TargetFileName)') "
52-
Uri="$(DotNetAssetRootUrl)%(RemoteAsset.Identity)"
53-
PrivateUri="$(DotNetPrivateAssetRootUrl)%(RemoteAsset.Identity)"
54-
PrivateUriSuffix="$(DotNetAssetRootAccessTokenSuffix)"
55-
DestinationPath="$(DepsPath)%(RemoteAsset.TargetFileName)" />
77+
<DownloadFile Condition=" ! Exists('$(DepsPath)$(arm64RemoteAssetFileName)') "
78+
Uris="@(UrisToDownload)"
79+
DestinationPath="$(DepsPath)$(arm64RemoteAssetFileName)" />
5680
</Target>
5781

5882
<Target Name="ExtractPropertiesFromDotNetMsi" DependsOnTargets="FetchDependencies" BeforeTargets="BeforeBuild">

0 commit comments

Comments
 (0)