Skip to content

Don't generate embedded ValidatableTypeAttribute for .NET 11 and later#55163

Open
Youssef1313 wants to merge 4 commits into
mainfrom
dev/ygerges/validatable-type-gen
Open

Don't generate embedded ValidatableTypeAttribute for .NET 11 and later#55163
Youssef1313 wants to merge 4 commits into
mainfrom
dev/ygerges/validatable-type-gen

Conversation

@Youssef1313

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings July 7, 2026 12:58
@Youssef1313 Youssef1313 requested a review from a team as a code owner July 7, 2026 12:58

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.

Pull request overview

Updates Razor SDK targets to stop generating an embedded ValidatableTypeAttribute for .NET 11+ targets, while preserving generation for net10.0 for compatibility scenarios (using a newer SDK while targeting .NET 10).

Changes:

  • Introduce a net10.0-exact targeting flag (_TargetingNET100Exactly).
  • Restrict the _AddEmbeddedValidationAttribute target (and its generated files/global using) to run only when targeting net10.0 exactly.

Comment thread src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Youssef1313 Youssef1313 requested review from a team and tmat as code owners July 7, 2026 16:00
@Youssef1313 Youssef1313 enabled auto-merge July 7, 2026 16:35
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.

4 participants