开发者

ReSharper isn't able to resolve Razor

开发者 https://www.devze.com 2023-02-20 20:23 出处:网络
I have an ASP.NET MVC 3 Solution within Visual Studio 2010 Premium with Service Pack 1. In the Web.Config my ReSharper Version (Build 5.1.3000.12) isn\'t able to resolve System.Web.WebPages.Razor.*

I have an ASP.NET MVC 3 Solution within Visual Studio 2010 Premium with Service Pack 1.

In the Web.Config my ReSharper Version (Build 5.1.3000.12) isn't able to resolve System.Web.WebPages.Razor.*

For example

<sectionGroup name="system.web.webPages.razor"
    type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup,
    System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35">

lets ReSharper mark the error Cannot resolve 开发者_开发知识库symbol 'Razor' and error Invalid module qualification: Failed to resolve assembly System.Web.WebPages.Razor

But all views (*.cshtml) are working fine and ReSharper doesn't mark errors there. Also under References I included System.Web.Razor. This errors also appeared with Visual Studio Premium without Service Pack 1. I'm getting this errors even if I create a new MVC 3 Project out of Visual Studio.

Thanks in advance for any help.


Resharper 5.1 doesn't support Razor, 6.0 will. You can download and use the nightly builds if you like, but they can be somewhat unstable. Use at your own risk.


As others have cited, this is a feature not a bug ;-)

If you would like to avoid annoyance with these errors, you may right click "web.config" in the "Errors in Solution" window (ReSharper -> Windows -> Solution Errors Window) and choose "Ignore Errors." Then they won't bug you any more.

Another plug for the ReSharper EAP program, I used it with 5.0+ and found it to be a reasonable way to get the latest and greatest. As others have said, your stability mileage may vary as these are nightly builds.

http://confluence.jetbrains.net/display/ReSharper/ReSharper+6.0+Nightly+Builds

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号