Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIHint can not resolve template in abstract models

Assume an abstract model like this:

 public abstract class MyClass : BaseEntity
{
    [UIHint("File")]
    public long? DocumentFileId { get; set; }
}

The problem is Cannot resolve template 'File', while there is File.cshtml in View editor templates.

Message as shown in Visual Studio

The point is, if I don't define MyClass as an abstract class, error will be solved.

My question is, why editor template can not resolve in abstract classes, and how can I handle it?

like image 639
Reza Owliaei Avatar asked Jun 08 '14 08:06

Reza Owliaei


Video Answer


1 Answers

This is a bug with ReSharper that was reported almost a year ago. Doesn't look like JetBrains are in a rush to fix it.

However, it shouldn't interfere with your development other than being a nuisance.

like image 146
DavidG Avatar answered Sep 29 '22 08:09

DavidG