Skip to content

Use RazorLangVersion 12 in .NET 12 - #56320

Merged
davidwengier merged 1 commit into
dotnet:mainfrom
davidwengier:razor-lang-version-12
Oct 8, 2026
Merged

davidwengier merged 1 commit into
dotnet:mainfrom
davidwengier:razor-lang-version-12

Conversation

@davidwengier

@davidwengier davidwengier commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Goes with dotnet/roslyn#85720, and probably shouldn't merge til that goes in.

@davidwengier
davidwengier requested review from a team and a lite review from Copilot September 16, 2026 02:06
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Roslyn dependency is not yet merged, and regression coverage for the new mapping is missing.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates Razor SDK defaults so .NET 12 projects use Razor language version 12.

Changes:

  • Adds .NET 12 TFM detection.
  • Defaults RazorLangVersion to 12.0.
  • Enables existing Razor tooling defaults.
File summaries
File Summary
src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets Adds .NET 12 Razor configuration defaults.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

@davidwengier
davidwengier requested a review from a team September 21, 2026 05:21
@davidwengier
davidwengier requested a review from a team September 21, 2026 12:33
davidwengier added a commit to dotnet/roslyn that referenced this pull request Sep 28, 2026
Adds `12.0` and `Version_12_0`, moves `Preview` to 12, and sets `Latest`
to 11 so `latest` doesn't select the new version implicitly. Includes
the version parsing test and the eight render-mode semantic-token
baselines affected by the version change.

This is the first layer of the Razor documentation stack. It replaces
#85671 and enables the separate dotnet/sdk#56320 change. It
doesn't add `@documentation` support.

Validation on this commit: formatting and analyser-enabled builds
passed. `RazorLanguageVersionTest`: 17 passed on `net10.0`.
`CohostSemanticTokensRangeEndpointTest.RenderMode` and
`RenderMode_Razor9`: eight passed in VS Code (`net10.0`) and eight in VS
(`net472`), with baseline generation disabled.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/roslyn/pull/85720)
@davidwengier
davidwengier merged commit bdf6a59 into dotnet:main Oct 8, 2026
27 checks passed
@davidwengier
davidwengier deleted the razor-lang-version-12 branch October 8, 2026 23:25
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 9, 2026
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.

3 participants