Skip to content

Dictionary as Razor model #49

@kbkrunner

Description

@kbkrunner

When the model definition is a Dictionary or other key-value list, the definition for is being split halfway through, it looks to happen on the comma ',' character. Then the rest of the minified contents are on the same line as the second half of the definition, causing a parser error.

Line 1: @model Dictionary<string,
Line 2: MyAssemblyName.Setting[]> @{ ViewData["Title"] = "Settings"; ......

Edit: Found this happens when there is a space after the comma, when there's no space the program works fine. But VS adds a space after the comma when the page is formatted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions