Skip to content

Conversation

@pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Jan 14, 2021

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 around dotnet run but missed verifying dotnet publish scenarios where the blazor.boot.json (Blazor WASM's equivalent to deps.json) is incorrect. This change addresses the issue.

Regression

Yes, compared to Blazor WASM 3.2

Customer impact

Customers with StaticWebAssetBasePath configured 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

  • Manual
    • CTI (Scenario added,next build will be validated
    • Engineers
  • Automated

Fixes #29264

@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jan 14, 2021
<_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'" />
Copy link
Member

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?

Copy link
Member

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.

@pranavkm pranavkm force-pushed the prkrishn/static-base-path-part-2 branch 2 times, most recently from b95cdf6 to 6060dbe Compare January 14, 2021 17:36
@pranavkm pranavkm added the Servicing-consider Shiproom approval is required for the issue label Jan 14, 2021
@ghost
Copy link

ghost commented Jan 14, 2021

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.

@mkArtakMSFT mkArtakMSFT added this to the 5.0.3 milestone Jan 14, 2021
@javiercn
Copy link
Member

I've validated the fix on a monkeypatched 5.0.102 SDK. The image below shows multiple apps loaded working within the build/development flow as well as the published output

image

@pranavkm pranavkm force-pushed the prkrishn/static-base-path-part-2 branch from 6060dbe to 84fec4a Compare January 14, 2021 18:31
@pranavkm pranavkm marked this pull request as ready for review January 14, 2021 18:35
@pranavkm pranavkm requested review from a team and SteveSandersonMS as code owners January 14, 2021 18:35
@leecow leecow added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 14, 2021
@mkArtakMSFT
Copy link
Contributor

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.

@rahou25
Copy link

rahou25 commented Sep 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components Servicing-approved Shiproom has approved the issue

Projects

None yet

7 participants