|
50 | 50 | --> |
51 | 51 | <ItemGroup> |
52 | 52 | <!-- Assemblies from packages --> |
53 | | - <_BlazorManagedRuntimeAssemby Include="@(RuntimeCopyLocalItems)" /> |
| 53 | + <_BlazorManagedRuntimeAssembly Include="@(RuntimeCopyLocalItems)" /> |
54 | 54 |
|
55 | 55 | <!-- Assemblies from other references --> |
56 | 56 | <_BlazorUserRuntimeAssembly Include="@(ReferencePath->WithMetadataValue('CopyLocal', 'true'))" /> |
57 | 57 | <_BlazorUserRuntimeAssembly Include="@(ReferenceDependencyPaths->WithMetadataValue('CopyLocal', 'true'))" /> |
58 | 58 |
|
59 | | - <_BlazorManagedRuntimeAssemby Include="@(_BlazorUserRuntimeAssembly)" /> |
60 | | - <_BlazorManagedRuntimeAssemby Include="@(IntermediateAssembly)" /> |
| 59 | + <_BlazorManagedRuntimeAssembly Include="@(_BlazorUserRuntimeAssembly)" /> |
| 60 | + <_BlazorManagedRuntimeAssembly Include="@(IntermediateAssembly)" /> |
61 | 61 | </ItemGroup> |
62 | 62 |
|
63 | 63 | <MakeDir Directories="$(_BlazorIntermediateOutputPath)" /> |
|
70 | 70 | satellite assemblies, this should include all assemblies needed to run the application. |
71 | 71 | --> |
72 | 72 | <ItemGroup> |
| 73 | + <_BlazorJSFile Include="$(_BlazorJSPath)" /> |
| 74 | + <_BlazorJSFile Include="$(_BlazorJSMapPath)" Condition="Exists('$(_BlazorJSMapPath)')" /> |
| 75 | + <_DotNetWasmRuntimeFile Include="$(ComponentsWebAssemblyRuntimePath)*" /> |
| 76 | + |
73 | 77 | <!-- |
74 | 78 | ReferenceCopyLocalPaths includes all files that are part of the build out with CopyLocalLockFileAssemblies on. |
75 | 79 | Remove assemblies that are inputs to calculating the assembly closure. Instead use the resolved outputs, since it is the minimal set. |
| 80 | +
|
| 81 | + ReferenceCopyLocalPaths also includes satellite assemblies from referenced projects but are inexpicably missing |
| 82 | + any metadata that might allow them to be differentiated. We'll explicitly add those |
| 83 | + to _BlazorOutputWithTargetPath so that satellite assemblies from packages, the current project and referenced project |
| 84 | + are all treated the same. |
76 | 85 | --> |
77 | | - <_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.dll'" /> |
78 | | - <_BlazorCopyLocalPaths Remove="@(_BlazorManagedRuntimeAssemby)" /> |
| 86 | + <_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" |
| 87 | + Exclude="@(_BlazorManagedRuntimeAssembly);@(ReferenceSatellitePaths)" |
| 88 | + Condition="'%(Extension)' == '.dll'" /> |
| 89 | + |
| 90 | + <_BlazorCopyLocalPaths Include="@(IntermediateSatelliteAssembliesWithTargetPath)"> |
| 91 | + <DestinationSubDirectory>%(IntermediateSatelliteAssembliesWithTargetPath.Culture)\</DestinationSubDirectory> |
| 92 | + </_BlazorCopyLocalPaths> |
79 | 93 |
|
80 | 94 | <_BlazorOutputWithTargetPath Include="@(_BlazorCopyLocalPaths)"> |
81 | 95 | <!-- This group is for satellite assemblies. We set the resource name to include a path, e.g. "fr\\SomeAssembly.resources.dll" --> |
82 | | - <BootManifestResourceType Condition="'%(Extension)' == '.dll'">assembly</BootManifestResourceType> |
83 | | - <BootManifestResourceType Condition="'%(Extension)' == '.pdb'">pdb</BootManifestResourceType> |
| 96 | + <BootManifestResourceType Condition="'%(_BlazorCopyLocalPaths.Culture)' == '' AND '%(_BlazorCopyLocalPaths.Extension)' == '.dll'">assembly</BootManifestResourceType> |
| 97 | + <BootManifestResourceType Condition="'%(_BlazorCopyLocalPaths.Culture)' != '' AND '%(_BlazorCopyLocalPaths.Extension)' == '.dll'">satellite</BootManifestResourceType> |
84 | 98 | <BootManifestResourceName>%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</BootManifestResourceName> |
85 | 99 | <TargetOutputPath>$(_BlazorRuntimeBinOutputPath)%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</TargetOutputPath> |
86 | 100 | </_BlazorOutputWithTargetPath> |
87 | 101 |
|
88 | | - <_BlazorOutputWithTargetPath Include="@(_BlazorResolvedAssembly)"> |
89 | | - <BootManifestResourceType Condition="'%(Extension)' == '.dll'">assembly</BootManifestResourceType> |
90 | | - <BootManifestResourceType Condition="'%(Extension)' == '.pdb'">pdb</BootManifestResourceType> |
91 | | - <BootManifestResourceName>%(FileName)%(Extension)</BootManifestResourceName> |
92 | | - <TargetOutputPath>$(_BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath> |
| 102 | + <_BlazorOutputWithTargetPath Include="@(ReferenceSatellitePaths)"> |
| 103 | + <Culture>$([System.String]::Copy('%(ReferenceSatellitePaths.DestinationSubDirectory)').Trim('\').Trim('/'))</Culture> |
| 104 | + <BootManifestResourceType>satellite</BootManifestResourceType> |
| 105 | + <BootManifestResourceName>%(ReferenceSatellitePaths.DestinationSubDirectory)%(FileName)%(Extension)</BootManifestResourceName> |
| 106 | + <TargetOutputPath>$(_BlazorRuntimeBinOutputPath)%(ReferenceSatellitePaths.DestinationSubDirectory)%(FileName)%(Extension)</TargetOutputPath> |
93 | 107 | </_BlazorOutputWithTargetPath> |
94 | | - </ItemGroup> |
95 | 108 |
|
96 | | - <!-- |
97 | | - We need to know at build time (not publish time) whether or not to include pdbs in the |
98 | | - blazor.boot.json file, so this is controlled by the BlazorEnableDebugging flag, whose |
99 | | - default value is determined by the build configuration. |
100 | | - --> |
101 | | - <ItemGroup Condition="'$(BlazorEnableDebugging)' != 'true'"> |
102 | | - <_BlazorOutputWithTargetPath Remove="@(_BlazorOutputWithTargetPath)" Condition="'%(Extension)' == '.pdb'" /> |
103 | | - </ItemGroup> |
104 | | - |
105 | | - <!-- |
106 | | - The following itemgroup attempts to extend the set to include satellite assemblies. |
107 | | - The mechanism behind this (or whether it's correct) is a bit unclear so |
108 | | - https://github.com/dotnet/aspnetcore/issues/18951 tracks the need for follow-up. |
109 | | - --> |
110 | | - <ItemGroup> |
111 | | - <!-- |
112 | | - ReferenceCopyLocalPaths includes all files that are part of the build out with CopyLocalLockFileAssemblies on. |
113 | | - Remove assemblies that are inputs to calculating the assembly closure. Instead use the resolved outputs, since it is the minimal set. |
114 | | - --> |
115 | | - <_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.dll'" /> |
116 | | - <_BlazorCopyLocalPaths Remove="@(_BlazorManagedRuntimeAssemby)" Condition="'%(Extension)' == '.dll'" /> |
117 | | - |
118 | | - <_BlazorOutputWithTargetPath Include="@(_BlazorCopyLocalPaths)"> |
| 109 | + <_BlazorOutputWithTargetPath Include="@(_BlazorResolvedAssembly)"> |
119 | 110 | <BootManifestResourceType Condition="'%(Extension)' == '.dll'">assembly</BootManifestResourceType> |
120 | | - <BootManifestResourceType Condition="'%(Extension)' == '.pdb'">pdb</BootManifestResourceType> |
| 111 | + <BootManifestResourceType Condition="'%(_BlazorCopyLocalPaths.Extension)' == '.pdb'">pdb</BootManifestResourceType> |
121 | 112 | <BootManifestResourceName>%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</BootManifestResourceName> |
122 | 113 | <TargetOutputPath>$(_BlazorRuntimeBinOutputPath)%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</TargetOutputPath> |
123 | 114 | </_BlazorOutputWithTargetPath> |
124 | | - </ItemGroup> |
125 | 115 |
|
126 | | - <ItemGroup> |
127 | | - <_DotNetWasmRuntimeFile Include="$(ComponentsWebAssemblyRuntimePath)*" /> |
128 | 116 | <_BlazorOutputWithTargetPath Include="@(_DotNetWasmRuntimeFile)"> |
129 | 117 | <TargetOutputPath>$(_BlazorRuntimeWasmOutputPath)%(FileName)%(Extension)</TargetOutputPath> |
130 | 118 | <BootManifestResourceType>runtime</BootManifestResourceType> |
131 | 119 | <BootManifestResourceName>%(FileName)%(Extension)</BootManifestResourceName> |
132 | 120 | </_BlazorOutputWithTargetPath> |
133 | 121 |
|
134 | | - <_BlazorJSFile Include="$(_BlazorJSPath)" /> |
135 | | - <_BlazorJSFile Include="$(_BlazorJSMapPath)" Condition="Exists('$(_BlazorJSMapPath)')" /> |
136 | 122 | <_BlazorOutputWithTargetPath Include="@(_BlazorJSFile)"> |
137 | 123 | <TargetOutputPath>$(_BaseBlazorRuntimeOutputPath)%(FileName)%(Extension)</TargetOutputPath> |
138 | 124 | </_BlazorOutputWithTargetPath> |
139 | 125 | </ItemGroup> |
| 126 | + |
| 127 | + <!-- |
| 128 | + We need to know at build time (not publish time) whether or not to include pdbs in the |
| 129 | + blazor.boot.json file, so this is controlled by the BlazorEnableDebugging flag, whose |
| 130 | + default value is determined by the build configuration. |
| 131 | + --> |
| 132 | + <ItemGroup Condition="'$(BlazorEnableDebugging)' != 'true'"> |
| 133 | + <_BlazorOutputWithTargetPath Remove="@(_BlazorOutputWithTargetPath)" Condition="'%(Extension)' == '.pdb'" /> |
| 134 | + </ItemGroup> |
140 | 135 | </Target> |
141 | 136 |
|
142 | 137 | <!-- |
|
218 | 213 | <Target |
219 | 214 | Name="_LinkBlazorApplication" |
220 | 215 | Inputs="$(ProjectAssetsFile); |
221 | | - @(_BlazorManagedRuntimeAssemby); |
| 216 | + @(_BlazorManagedRuntimeAssembly); |
222 | 217 | @(BlazorLinkerDescriptor); |
223 | 218 | $(MSBuildAllProjects)" |
224 | 219 | Outputs="$(_BlazorLinkerOutputCache)"> |
|
277 | 272 | Name="_ResolveBlazorRuntimeDependencies" |
278 | 273 | Inputs="$(ProjectAssetsFile); |
279 | 274 | @(IntermediateAssembly); |
280 | | - @(_BlazorManagedRuntimeAssemby)" |
| 275 | + @(_BlazorManagedRuntimeAssembly)" |
281 | 276 | Outputs="$(_BlazorApplicationAssembliesCacheFile)"> |
282 | 277 |
|
283 | 278 | <!-- |
|
287 | 282 | --> |
288 | 283 | <ResolveBlazorRuntimeDependencies |
289 | 284 | EntryPoint="@(IntermediateAssembly)" |
290 | | - ApplicationDependencies="@(_BlazorManagedRuntimeAssemby)" |
| 285 | + ApplicationDependencies="@(_BlazorManagedRuntimeAssembly)" |
291 | 286 | WebAssemblyBCLAssemblies="@(_WebAssemblyBCLAssembly)"> |
292 | 287 |
|
293 | 288 | <Output TaskParameter="Dependencies" ItemName="_BlazorResolvedAssembly" /> |
|
0 commit comments