Skip to content

Commit fa3e67b

Browse files
committed
Fix build failures and fix special handling for the file scheme
1 parent c48743d commit fa3e67b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@
246246
<OfficialBaseURL>https://dotnetcli.azureedge.net/dotnet/</OfficialBaseURL>
247247
<!-- Allow overriding the public base URL for Unified Build scenarios to pull assets from a local build. -->
248248
<PublicBaseURL Condition="'$(PublicBaseURL)' == ''">https://dotnetbuilds.azureedge.net/public/</PublicBaseURL>
249-
<!-- MSBuild removes the '//' slashes when passing PublicBaseURL from the outer to the inner build. -->
250-
<PublicBaseURL Condition="$(PublicBaseURL.StartsWith('file:')) and '$(OS)' != 'Windows_NT'">$([System.Text.RegularExpressions.Regex]::Replace('$(PublicBaseURL)', '%28file:\/{1,}%29%28.+%29', 'file:///%242'))</PublicBaseURL>
251249
<InternalBaseURL>https://dotnetbuilds.azureedge.net/internal/</InternalBaseURL>
252250
<!-- Allow overriding where installers are pulled in from previously completed jobs in Unified Build scenarios. -->
253251
<CrossArchitectureInstallerBasePath Condition="'$(CrossArchitectureInstallerBasePath)' == ''">$(InstallersOutputPath)</CrossArchitectureInstallerBasePath>
@@ -270,7 +268,9 @@
270268
In a vertical build, the public URL will be overwritten to point to local build artifacts.
271269
-->
272270
<ItemGroup Condition="'$(DotNetBuild)' == 'true'">
273-
<RemoteAssetBaseURL Include="$(PublicBaseURL)" />
271+
<!-- MSBuild removes the '//' slashes when passing PublicBaseURL from the outer to the inner build. -->
272+
<RemoteAssetBaseURL Condition="$(PublicBaseURL.StartsWith('file:')) and '$(OS)' != 'Windows_NT'" Include="$([System.Text.RegularExpressions.Regex]::Replace('$(PublicBaseURL)', '%28file:\/{1,}%29%28.+%29', 'file:///%242'))" />
273+
<RemoteAssetBaseURL Condition="!$(PublicBaseURL.StartsWith('file:')) or '$(OS)' == 'Windows_NT'" Include="$(PublicBaseURL)" />
274274
</ItemGroup>
275275

276276
<PropertyGroup>

src/Installers/Windows/WindowsHostingBundle/Product.targets

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@
7777

7878
<Target Name="FetchDependencies" BeforeTargets="Restore;CollectPackageReferences"
7979
Outputs="$(DepsPath)%(RemoteAsset.TargetFilename)">
80-
<!--
81-
Try various places to find the runtime. It's either released (use official version), public but
82-
unreleased (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal).
83-
-->
80+
<PropertyGroup>
81+
<_CurrentRemoteAsset>%(RemoteAsset.Identity)</_CurrentRemoteAsset>
82+
</PropertyGroup>
8483
<ItemGroup>
8584
<UrisToDownload Remove="@(UrisToDownload)" />
86-
<UrisToDownload Include="@(RemoteAssetBaseURL->'%(Identity)Runtime/%(RemoteAsset.Identity)')" />
85+
<UrisToDownload Include="@(RemoteAssetBaseURL->'%(Identity)Runtime/$(_CurrentRemoteAsset)')" />
8786
</ItemGroup>
8887

8988
<DownloadFile Condition=" ! Exists('$(DepsPath)%(RemoteAsset.TargetFilename)') "

0 commit comments

Comments
 (0)