Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,28 @@
</ItemGroup>
</Target>

<!--
Workaround the issue where the empty json file is not included.
Remove for preview 2 as it is fixed in https://github.com/dotnet/aspnetcore/pull/60368
See: https://github.com/dotnet/maui/issues/27806
-->
<Target Name="_Maui_Before_AddBlazorWebViewAssets"
BeforeTargets="_AddBlazorWebViewAssets"
DependsOnTargets="_MauiAddEmptyBlazorModulesJson"
Condition="'$(_MauiSkipAddEmptyBlazorModulesJson)' == 'true'" />
<Target Name="_MauiAddEmptyBlazorModulesJson" Condition="'@(_ExistingBuildJSModules)' == ''">
<PropertyGroup>
<_MauiBlazorWebViewModulesJsonPath>$(IntermediateOutputPath)blazor.modules.json</_MauiBlazorWebViewModulesJsonPath>
</PropertyGroup>
<WriteLinesToFile File="$(_MauiBlazorWebViewModulesJsonPath)" Lines="[]" Overwrite="true" WriteOnlyWhenDifferent="True" />
<ItemGroup>
<FileWrites Include="$(_MauiBlazorWebViewModulesJsonPath)" />
</ItemGroup>
<ItemGroup>
<_WebViewAssetCandidates Include="$(_MauiBlazorWebViewModulesJsonPath)">
<RelativePath>_framework/blazor.modules.json</RelativePath>
</_WebViewAssetCandidates>
</ItemGroup>
</Target>

</Project>