diff --git a/src/Installers/Windows/WindowsHostingBundle/Product.targets b/src/Installers/Windows/WindowsHostingBundle/Product.targets index dab41417731c9136429be81eaaa986aa335b834a..fcf92fa1a106ebf2e09d552d129afd594436bf33 100644 --- a/src/Installers/Windows/WindowsHostingBundle/Product.targets +++ b/src/Installers/Windows/WindowsHostingBundle/Product.targets @@ -26,33 +26,57 @@ </ItemGroup> <Target Name="FetchDependencies" BeforeTargets="Restore;CollectPackageReferences"> + <!-- Use the BrowserDebugHost as a sentinel for the nonshipping version for NETCoreApp. --> <PropertyGroup> - <DotNetAssetRootUrl Condition=" '$(DotNetAssetRootUrl)' == '' ">https://dotnetcli.azureedge.net/dotnet/</DotNetAssetRootUrl> - <DotNetAssetRootUrl Condition=" ! $(DotNetAssetRootUrl.EndsWith('/'))">$(DotNetAssetRootUrl)/</DotNetAssetRootUrl> - <DotNetPrivateAssetRootUrl Condition=" '$(DotNetPrivateAssetRootUrl)' == '' ">https://dotnetclimsrc.azureedge.net/dotnet/</DotNetPrivateAssetRootUrl> - <DotNetPrivateAssetRootUrl Condition=" ! $(DotNetPrivateAssetRootUrl.EndsWith('/'))">$(DotNetPrivateAssetRootUrl)/</DotNetPrivateAssetRootUrl> + <x64RemoteAsset>Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</x64RemoteAsset> + <x64RemoteAssetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</x64RemoteAssetFileName> + <x86RemoteAsset>Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</x86RemoteAsset> + <x86RemoteAssetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</x86RemoteAssetFileName> + <arm64RemoteAsset>Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</arm64RemoteAsset> + <arm64RemoteAssetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</arm64RemoteAssetFileName> </PropertyGroup> - <!-- Use the BrowserDebugHost as a sentinel for the nonshipping version for NETCoreApp. --> + <MakeDir Directories="$(DepsPath)" /> + + <!-- Try various places to find the installers. It's either released (use official version), + public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) --> <ItemGroup> - <RemoteAsset Include="Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe"> - <TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe</TargetFileName> - </RemoteAsset> - <RemoteAsset Include="Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe"> - <TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe</TargetFileName> - </RemoteAsset> - <RemoteAsset Include="Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe"> - <TargetFileName>dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe</TargetFileName> - </RemoteAsset> + <UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/$(x64RemoteAsset)" /> + <UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(x64RemoteAsset)" /> + <UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(x64RemoteAsset)"> + <token>$(DotnetRuntimeSourceFeedKey)</token> + </UrisToDownload> </ItemGroup> - <MakeDir Directories="$(DepsPath)" /> + <DownloadFile Condition=" ! Exists('$(DepsPath)$(x64RemoteAssetFileName)') " + Uris="@(UrisToDownload)" + DestinationPath="$(DepsPath)$(x64RemoteAssetFileName)" /> + + <ItemGroup> + <UrisToDownload Remove="@(UrisToDownload)" /> + <UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/$(x86RemoteAsset)" /> + <UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(x86RemoteAsset)" /> + <UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(x86RemoteAsset)"> + <token>$(DotnetRuntimeSourceFeedKey)</token> + </UrisToDownload> + </ItemGroup> + + <DownloadFile Condition=" ! Exists('$(DepsPath)$(x86RemoteAssetFileName)') " + Uris="@(UrisToDownload)" + DestinationPath="$(DepsPath)$(x86RemoteAssetFileName)" /> + + <ItemGroup> + <UrisToDownload Remove="@(UrisToDownload)" /> + <UrisToDownload Include="https://dotnetcli.azureedge.net/dotnet/Runtime/$(arm64RemoteAsset)" /> + <UrisToDownload Include="https://dotnetbuilds.azureedge.net/public/$(arm64RemoteAsset)" /> + <UrisToDownload Include="https://dotnetbuilds.azureedge.net/internal/$(arm64RemoteAsset)"> + <token>$(DotnetRuntimeSourceFeedKey)</token> + </UrisToDownload> + </ItemGroup> - <DownloadFile Condition=" ! Exists('$(DepsPath)%(RemoteAsset.TargetFileName)') " - Uri="$(DotNetAssetRootUrl)%(RemoteAsset.Identity)" - PrivateUri="$(DotNetPrivateAssetRootUrl)%(RemoteAsset.Identity)" - PrivateUriSuffix="$(DotNetAssetRootAccessTokenSuffix)" - DestinationPath="$(DepsPath)%(RemoteAsset.TargetFileName)" /> + <DownloadFile Condition=" ! Exists('$(DepsPath)$(arm64RemoteAssetFileName)') " + Uris="@(UrisToDownload)" + DestinationPath="$(DepsPath)$(arm64RemoteAssetFileName)" /> </Target> <Target Name="ExtractPropertiesFromDotNetMsi" DependsOnTargets="FetchDependencies" BeforeTargets="BeforeBuild">