Skip to content

Razor runtime compilation fails for duplicate types using extern aliases. #41632

Open
@malylemire1

Description

@malylemire1

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Runtime compilation ignore the project references, assembly references or package references aliases.
I get a type exists in both assemblies error.

Expected Behavior

Aliases should be supported.

Steps To Reproduce

Create two class library projects with the same type name and namespace. Import one and the other in an asp.core project. Use an alias for one of them. Use the type without alias in a razor view and enable runtime compilation.

Exceptions (if any)

Type exists in both assemblies exception.

.NET Version

dotnet --6.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-runtime-compilation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions