MVC4 display modes view resolution problems


We use Displaymode feature of MVC4 to implement multitenancy for views in our MVC application. It works as following - a list of displaymodes is generated on app startup e.g for 2 tenants:

0. suffix = "", name = "tenant1mobile"
1. suffix = "", name = "tenant2mobile"
2. suffix = "tenant1", name = "tenant1"
3. suffix = "tenant2", name = "tenant2"
4. suffix = "mobile", name = "mobile"
5. suffix = "", name = ""

Corresponding views will then have following extensions:

In this case there is no reason to have separate "Index.cshtml" created since all tenants have their respective overloads.

Unfortunately resharper struggles to resolve "Index" view in this case and I can only guess why:
1. is it because it does not support suffixes with "." inside?
2. is it because full list of display modes is generated on app startup and resharper supports only declarative lists?
3. any other reason

Could you please elaborate on how the View resolution works in resharper in context of R# 7 feature of supporting display modes in MVC4?

P.S. We use MVC4 on .net 4.0 in VS2010; R# is

Best Regards,


Just doublechecked - still an issue in R# 8 eap.

Could you please post suggestions of how to overcome this problem, or should I file a bug?

Is there any way to help resharper with view resolution?

Best Regards,


Hello Sergei,

The best way to solve this issue is to fill in a bug-report in YouTrack here:
Please make sure that you'll attach a repro case there, as well as post an issue link here so I could update ticket fields and assign it to the corresponding developer.

Thank you in advacne for that!


Please sign in to leave a comment.