Skip to content

MapDynamicControllerRoute doesn't work with DefaultLinkGenerator #16965

Open
@ollieferns

Description

@ollieferns

Describe the bug

The DefaultLink Generator (and the AnchorTagHelper) do not work when mapping dynamic routes. They do not find any routes and produce a null href.

To Reproduce

  1. create a vanilla mvc site
  2. add one dynamic route
  3. use the anchor tag helper or the LinkGen class
  4. Result is href is null.

see v simple example here.

https://github.com/ollieferns/dynamiclinkgenissue

Further technical details

  • ASP.NET Core version 3.1 (preview)
    .NET Core SDK (reflecting any global.json):
    Version: 3.1.100-preview2-014569
    Commit: 4bd5d24d87

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.100-preview2-014569/

Host (useful for support):
Version: 3.1.0-preview2.19525.6
Commit: 5672978d91

.NET Core SDKs installed:
3.0.100 [/usr/local/share/dotnet/sdk]
3.1.100-preview1-014459 [/usr/local/share/dotnet/sdk]
3.1.100-preview2-014569 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0-preview1.19508.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0-preview2.19528.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0-preview1.19506.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0-preview2.19525.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releaseaffected-mediumThis issue impacts approximately half of our customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-routingneeds-prototypeseverity-blockingThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions