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

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

Closed
NTaylorMullen opened this issue Mar 28, 2017 · 1 comment
Closed
Assignees

Comments

@NTaylorMullen
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants