Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Using TModel in ViewImports causes compile errors at design time #1137

@NTaylorMullen

Description

@NTaylorMullen

We generate directive helper statements to provide intellisense for @inject IHtmlHelper<TModel> that look like:

((System.Action)(() => {
    global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> __typeHelper = null;
}
))();

The problem is TModel isn't a valid C# term. @pranavkm got around this in the past by essentially doing a using TModel = dynamic statement at the top of the file.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions