Skip to content

Verify that Razor compiler honors global usings when generating code for .cshtml & .razor files #34217

Closed
@DamianEdwards

Description

@DamianEdwards

With C# 10 introducing support for global usings declarations and the SDK now implicitly adding global usings for projects targeting .NET 6 we need to verify that the Razor compiler honors any global usings (whether set via the SDK or in the project) in the code it generates.

We expect this will "just work" so this issue is to ensure we verify that.

Assuming this is verified we can update the project templates to not explicitly add usings in .cshtml/.razor files if they're already added by the SDK.

@captainsafia @pranavkm

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedValidationThis issue is used to track validation effortsarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-mvc-razor-viewsFeatures related to the Razor view engine for Razor pages and MVC views

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions