Skip to content

Commit dd9fbd7

Browse files
author
Mackinnon Buck
committed
Don't include framework assets when NodeJS is disabled
1 parent 0ea2f25 commit dd9fbd7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Assets/Microsoft.AspNetCore.App.Internal.Assets.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<_BlazorJSContentRoot Condition="'$(Configuration)' == 'Release'">$(RepoRoot)src\Components\Web.JS\dist\Release</_BlazorJSContentRoot>
2222
</PropertyGroup>
2323

24-
<ItemGroup>
24+
<ItemGroup Condition="'$(BuildNodeJS)' == 'true'">
2525
<_BlazorJSFile Include="$(_BlazorJSContentRoot)\blazor.web.js" />
2626
<_BlazorJSFile Include="$(_BlazorJSContentRoot)\blazor.server.js" />
2727
<_BlazorJSFile Include="$(_BlazorJSContentRoot)\blazor.webassembly.js" />

src/Assets/build/Microsoft.AspNetCore.App.Internal.Assets.targets

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,22 @@
3333
<_FrameworkStaticWebAssetCandidate Include="$(BlazorFrameworkStaticWebAssetRoot)\blazor.webassembly.js.map" />
3434
</ItemGroup>
3535

36+
<ItemGroup>
37+
<_MissingFrameworkStaticWebAssetCandidate
38+
Include="@(_FrameworkStaticWebAssetCandidate)"
39+
Condition="!EXISTS('%(Identity)')" />
40+
<_FrameworkStaticWebAssetCandidate Remove="@(_MissingFrameworkStaticWebAssetCandidate)" />
41+
</ItemGroup>
42+
43+
<Message Importance="High" Text="Framework asset '%(_MissingFrameworkStaticWebAssetCandidate.Identity)' could not be found and won't be included in the project." />
44+
3645
<PropertyGroup>
3746
<_FrameworkAssetsPath>$(IntermediateOutputPath)frameworkassets</_FrameworkAssetsPath>
3847
</PropertyGroup>
3948

4049
<MakeDir
4150
Directories="$(_FrameworkAssetsPath)"
42-
Condition="!Exists('$(_FrameworkAssetsPath)')" />
51+
Condition="!EXISTS('$(_FrameworkAssetsPath)')" />
4352

4453
<Copy
4554
SourceFiles="@(_FrameworkStaticWebAssetCandidate)"

0 commit comments

Comments
 (0)