-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Produce correct blazor.boot.json when using StaticWebAssetBasePath #29293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| <_BlazorPublishBootResource | ||
| Include="@(ResolvedFileToPublish)" | ||
| Condition="$([System.String]::Copy('%(RelativePath)').Replace('\','/').StartsWith('wwwroot/_framework')) AND '%(Extension)' != '.a'" /> | ||
| Condition="$([System.String]::Copy('%(RelativePath)').Replace('/','\').StartsWith($(_BlazorFrameworkPublishPath))) AND '%(Extension)' != '.a'" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.Replace('/','')
What's the reasoning for this bit of change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's likely because we normalized things earlier within ResolvedFileToPublish and that broke this target.
b95cdf6 to
6060dbe
Compare
|
Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge. |
6060dbe to
84fec4a
Compare
|
Thanks for helping out with this, everyone. We also have a confirmation now, that one customer app which was failing is also working with this fix. |
|
Hi guys, someone can explain me what to fix as I'm having the exact same issue with .net 6. Two blazor wasm client projects linked to a server. And everything works perfectly on local but got a 404 once deployed on IIS. |

Description
This is a follow up to an issue that was patched in 5.0.2. Blazor WASM allows publishing files to a subdirectory by configuring the
StaticWebAssetBasePath. In an earlier fix, we resolved issues arounddotnet runbut missed verifyingdotnet publishscenarios where the blazor.boot.json (Blazor WASM's equivalent todeps.json) is incorrect. This change addresses the issue.Regression
Yes, compared to Blazor WASM 3.2
Customer impact
Customers with
StaticWebAssetBasePathconfigured in their apps are unable to run the app once it's published.Risk
Low. We should have much more confidence in the change, including SDK tests that verify publising, integration tests that verfy dotnet run, and CTI scenarios to capture the end-to-end worklows.
Validation
Fixes #29264