Skip to content

Update invalid langver error message#12611

Merged
davidwengier merged 2 commits intodotnet:mainfrom
jjonescz:langver-error
Dec 18, 2025
Merged

Update invalid langver error message#12611
davidwengier merged 2 commits intodotnet:mainfrom
jjonescz:langver-error

Conversation

@jjonescz
Copy link
Member

No description provided.

@jjonescz jjonescz requested a review from a team as a code owner December 17, 2025 10:43
</data>
<data name="InvalidRazorLangMessage" xml:space="preserve">
<value>Invalid value '{0}'' for RazorLangVersion. Valid values include 'Latest' or a valid version in range 1.0 to 8.0.</value>
<value>Invalid value '{0}' for RazorLangVersion. Valid values include 'Latest' or a valid version in range 1.0 to 11.0.</value>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL. And also I'm definitely going to forget to update this again next year. Can we make the 11.0 an argument, and pass in RazorLangVersion.Preview when creating the diagnostic?

Also should probably add "'Preview'" to the valid values mentioned

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test to catch this next year, but making this an argument sounds even better, thanks.

Copy link
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case adding another argument is difficult, or impossible, this is clearly still an improvement :)

@jjonescz
Copy link
Member Author

@dotnet/razor-tooling do I need another review here? If not, feel free to merge this, thanks

@davidwengier
Copy link
Member

Nope, we don't have enough team members to require two reviewers. It's the Wild West! :)

@davidwengier davidwengier merged commit de6a167 into dotnet:main Dec 18, 2025
10 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 18, 2025
@jjonescz jjonescz deleted the langver-error branch December 18, 2025 09:59
@jjonescz
Copy link
Member Author

jjonescz commented Dec 18, 2025

That was partly my question, but partly also if I need another review for the additional commit I pushed since your sign off. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants