Skip to content

Commit faed3a4

Browse files
Attempt to stop breaking test about satellite assemblies
1 parent e1dcf8e commit faed3a4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@
108108
Message="Unrecongnized value for BlazorLinkOnBuild: '$(BlazorLinkOnBuild)'. Valid values are 'true' or 'false'."
109109
Condition="'$(BlazorLinkOnBuild)' != 'true' AND '$(BlazorLinkOnBuild)' != 'false'" />
110110

111+
<!--
112+
These are the items calculated as the closure of the runtime assemblies, either by calling the linker
113+
or by calling our custom ResolveBlazorRuntimeDependencies task if the linker was disabled. Other than
114+
satellite assemblies, this should include all assemblies needed to run the application.
115+
-->
111116
<ItemGroup>
112117
<!--
113118
ReferenceCopyLocalPaths includes all files that are part of the build out with CopyLocalLockFileAssemblies on.
@@ -129,6 +134,26 @@
129134
</BlazorOutputWithTargetPath>
130135
</ItemGroup>
131136

137+
<!--
138+
The following itemgroup attempts to extend the set to include satellite assemblies.
139+
The mechanism behind this (or whether it's correct) is a bit unclear so
140+
https://github.com/dotnet/aspnetcore/issues/18951 tracks the need for follow-up.
141+
-->
142+
<ItemGroup>
143+
<!--
144+
ReferenceCopyLocalPaths includes all files that are part of the build out with CopyLocalLockFileAssemblies on.
145+
Remove assemblies that are inputs to calculating the assembly closure. Instead use the resolved outputs, since it is the minimal set.
146+
-->
147+
<_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.dll'" />
148+
<_BlazorCopyLocalPaths Remove="@(_BlazorManagedRuntimeAssemby)" Condition="'%(Extension)' == '.dll'" />
149+
150+
<BlazorOutputWithTargetPath Include="@(_BlazorCopyLocalPaths)">
151+
<BlazorRuntimeFile>true</BlazorRuntimeFile>
152+
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</TargetOutputPath>
153+
<RelativeOutputPath>%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</RelativeOutputPath>
154+
</BlazorOutputWithTargetPath>
155+
</ItemGroup>
156+
132157
<ItemGroup>
133158
<MonoWasmFile Include="$(DotNetWebAssemblyRuntimePath)*" />
134159
<BlazorJSFile Include="$(BlazorJSPath)" />

0 commit comments

Comments
 (0)