I got the following view model
public enum EnumViewModel
{
[Display(Name = "Foo")]
First,
[Display(Name = "Bar")]
Another
}
With this view
@Html.DisplayFor(model => model.ProjectStatus)
Locally it displays Foo
as expected.
However when I publish it displays: First
.
I cannot figure out why.
Update
If I use this approach it works both locally and when published. But I'm not looking for a workaround. So I'd still like to know what's causing this odd issue.