I've upgraded from ReSharper 7 on vs2012 pro to ReSharper 8.1 on vs2013 pro, and ReSharper is now warning me a lot of my partial views cannot be resolved. It seems to be only happening:
E.g. Home.Master
, located in ~/Views/Home/Home.Master renders UserProfile.ascx
, located in ~/Views/Home/UserProfile.ascx.
Both <%: Html.RenderPartial("UserProfile") %>
and <%: Html.RenderPartial("~/Views/Home/UserProfile.ascx"%>
are flagged by ReSharper as invalid.
Additionally, shared partials in the ~/views/shared folder seem to be picked up fine when I reference just by name:
However, referencing the view by path doesn't seem to work:
(NB. Both images are taken inside Home.Master, in ~/Views/Home)
When I run the application, the partials work correctly, so it seems to be a change in ReSharper 8.1. Is there anything I can do to fix this?
It's a bug in ReSharper.
The best thing for now is to set it to ignore this type of error.
You can do this by selecting 'inspection options' from the 'red light bulb' on the left hand side and setting it to another option. Hopefully it will be fixed soon!
Edit: See this ticket for the problem. http://youtrack.jetbrains.com/issue/RSRP-395642
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With