Skip to content
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

[Blazor] Update router attribute to be explicitly passed as a boolean #28285

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

javiercn
Copy link
Member

@javiercn javiercn commented Dec 1, 2020

Description

We introduced a public property as part of #27907 to enable users to opt-in. Turns out that this caused issues since we didn't update the target pack.

As a result, the Razor compiler treats this new property as a regular HTML attribute (of type string) instead of as a boolean.

In turn this causes the template to error at runtime when the application starts.

Customer Impact

Customers using 5.0.1 won't be able to create and run new blazor apps out of the box. They can fix the template code by preceding the true value in the attribute with @ to force the compiler to interpret it as C#. (Which is the same fix we are applying).

Regression?

Yes, 5.0.0. Users were able to create new blazor templates without this issue.

Risk

Low. We've manually validated the fix against a new project from a 5.0.1 template.

@javiercn javiercn changed the base branch from master to release/5.0 December 1, 2020 19:10
@javiercn javiercn requested a review from a team December 1, 2020 19:24
@pranavkm pranavkm marked this pull request as ready for review December 1, 2020 19:28
@javiercn javiercn added the Servicing-consider Shiproom approval is required for the issue label Dec 1, 2020
@ghost
Copy link

ghost commented Dec 1, 2020

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.

@javiercn
Copy link
Member Author

javiercn commented Dec 1, 2020

/AzurePipelines run AspNetCore-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@javiercn
Copy link
Member Author

javiercn commented Dec 1, 2020

Test failures are unrelated, but re-triggered the build in any case.

@mkArtakMSFT mkArtakMSFT added this to the 5.0.2 milestone Dec 1, 2020
@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Dec 1, 2020
@mkArtakMSFT mkArtakMSFT modified the milestones: 5.0.2, 5.0.1 Dec 1, 2020
@mkArtakMSFT mkArtakMSFT added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Dec 1, 2020
@mkArtakMSFT mkArtakMSFT merged commit fc93e59 into release/5.0 Dec 1, 2020
@mkArtakMSFT mkArtakMSFT deleted the javiercn/attribute-as-boolean branch December 1, 2020 22:40
@Pilchie
Copy link
Member

Pilchie commented Dec 1, 2020

For the record, we decided to take this for 5.0.1 in order to ensure that people creating new projects aren't broken.

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
Development

Successfully merging this pull request may close these issues.

4 participants