Ensure BlazorWebAssembly.js is present (#23518)
This commit is contained in:
parent
eb76931578
commit
3fe6b07412
|
|
@ -0,0 +1,5 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<BlazorWebAssemblyJSPath>$(MSBuildThisFileDirectory)blazor.webassembly.js</BlazorWebAssemblyJSPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -92,6 +92,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<!--
|
||||
Calculates the outputs and the paths for Blazor WASM. This target is invoked frequently and should perform minimal work.
|
||||
-->
|
||||
|
||||
<ItemGroup>
|
||||
<_BlazorJSFile Include="$(BlazorWebAssemblyJSPath)" />
|
||||
<_BlazorJSFile Include="$(BlazorWebAssemblyJSMapPath)" Condition="Exists('$(BlazorWebAssemblyJSMapPath)')" />
|
||||
|
|
@ -140,7 +141,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<Output TaskParameter="SatelliteAssembly" ItemName="_BlazorReadSatelliteAssembly" />
|
||||
</BlazorReadSatelliteAssemblyFile>
|
||||
|
||||
<ItemGroup >
|
||||
<ItemGroup>
|
||||
<!-- We've imported a previously Cacheed file. Let's turn in to a _BlazorOutputWithTargetPath -->
|
||||
<_BlazorOutputWithTargetPath
|
||||
Include="@(_BlazorReadSatelliteAssembly)"
|
||||
|
|
@ -162,6 +163,12 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<ReferenceCopyLocalPaths DestinationSubDirectory="$(_BlazorOutputPath)%(ReferenceCopyLocalPaths.DestinationSubDirectory)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- A missing blazor.webassembly.js is our packaging error. Produce an error so it's discovered early. -->
|
||||
<Error
|
||||
Text="Unable to find BlazorWebAssembly JS files. This usually indicates a packaging error."
|
||||
Code="RAZORSDK1007"
|
||||
Condition="'@(_BlazorJSFile->Count())' == '0'" />
|
||||
|
||||
<!--
|
||||
When building with BuildingProject=false, satellite assemblies do not get resolved (the ones for the current project and the one for
|
||||
referenced project). BuildingProject=false is typically set for referenced projects when building inside VisualStudio.
|
||||
|
|
|
|||
Loading…
Reference in New Issue