Using VS2008 and R# 5 I'm running into an odd situation, where on an aspx page I keep getting
在使用VS2008和r# 5时,我遇到了一个奇怪的情况,在一个aspx页面上,我不断地得到它
Cannot resolve symbol 'symbolname'
But the code compiles and runs fine. While having a fix for this would be great, I'm just trying to figure out if I'm losing my mind.
但是代码编译和运行良好。虽然解决这个问题很好,但我只是想弄清楚我是不是疯了。
The CodeFile directive and Inherits directives are fine. If I compile the app or just let devenv sit for a bit it'll go away, but as soon as I save the aspx [via ctrl+s] R# suddenly has trouble with the Inherits attribute and flips out on every method in the page (OnClick etc).
代码文件指令和继承指令是可以的。如果我编译这个应用程序,或者让devenv坐一会儿,它就会消失,但是一旦我保存了aspx[通过ctrl+s] R#,继承属性就会出现问题,页面中的每个方法都会出现问题(OnClick等)。
// Anonymized of course but otherwise intact
<%@ Page AutoEventWireup="true" CodeFile="TestPage.aspx.cs" Inherits="TestPage" Language="C#" MasterPageFile="~/MasterPage.master" Title="Test Page Title" %>
This is mostly just a grievance, because since the code compiles it doesn't stop me from doing what I need.
这主要是一种委屈,因为代码编译后并没有阻止我做我需要做的事情。
I would post a bug report to the JetBrains site but first I would like to know I'm not alone. It could be my machine. Maybe when I roll to VS2010 in a couple weeks this will go away?
我想在JetBrains网站上发布一个bug报告,但是首先我想知道我并不孤单。可能是我的机器。也许当我在几周后转到VS2010时,它会消失吗?
6 个解决方案
#1
11
In Resharper you can disable inspection for that file with: Ctrl + Shift + Alt + 8.
在Resharper中,你可以禁用这个文件的检查:Ctrl + Shift + Alt + 8。
#2
8
So no final resolution yet. According to tech-support this is a known issue and is being researched. Final resolution undetermined at this time. If you're experiencing a similar issue, just hang tight. URL: http://youtrack.jetbrains.net/issue/RSRP-178681
所以还没有最终的决议。根据技术支持,这是一个已知的问题,正在研究中。最终决议尚未确定。如果你遇到类似的问题,那就坚持住。URL:http://youtrack.jetbrains.net/issue/rsrp - 178681
#3
4
Nothing worked for me until I followed this answer -- removing the related reference from the Project/References and then adding it again.
在我遵循这个答案之前,没有任何东西对我有用——从项目/引用中删除相关的引用,然后再添加它。
#4
2
I just tried something odd and it worked. In your page directive, change the AutoEventWireup to false, SAVE the file, then change it back to true. It's some connection between the aspx file and the designer I think.
我只是尝试了一些奇怪的东西。在页面指令中,将AutoEventWireup更改为false,保存文件,然后将其更改为true。我认为是aspx文件和设计器之间的某种联系。
#5
2
This worked in my case (Visual Studio 2015): Go to Menu and select Options. From the opened window, select ReSharper Ultimate (yours might be different edition) and click Suspend. That will basically suspend all the resharper features. Then click "Resume"
这在我的例子中行得通(Visual Studio 2015):进入菜单并选择选项。在打开的窗口中,选择ReSharper Ultimate(你的版本可能是不同的版本)并单击Suspend。这将基本上暂停所有resharper特性。然后单击“恢复”
That should work. Otherwise, try to clean Resharper cache.
这应该工作。否则,尝试清理Resharper缓存。
#6
0
Suspend and and restarting Reshaper worked. Issue was resolved.
挂起和重新启动的修纸机工作。问题是解决了。
#1
11
In Resharper you can disable inspection for that file with: Ctrl + Shift + Alt + 8.
在Resharper中,你可以禁用这个文件的检查:Ctrl + Shift + Alt + 8。
#2
8
So no final resolution yet. According to tech-support this is a known issue and is being researched. Final resolution undetermined at this time. If you're experiencing a similar issue, just hang tight. URL: http://youtrack.jetbrains.net/issue/RSRP-178681
所以还没有最终的决议。根据技术支持,这是一个已知的问题,正在研究中。最终决议尚未确定。如果你遇到类似的问题,那就坚持住。URL:http://youtrack.jetbrains.net/issue/rsrp - 178681
#3
4
Nothing worked for me until I followed this answer -- removing the related reference from the Project/References and then adding it again.
在我遵循这个答案之前,没有任何东西对我有用——从项目/引用中删除相关的引用,然后再添加它。
#4
2
I just tried something odd and it worked. In your page directive, change the AutoEventWireup to false, SAVE the file, then change it back to true. It's some connection between the aspx file and the designer I think.
我只是尝试了一些奇怪的东西。在页面指令中,将AutoEventWireup更改为false,保存文件,然后将其更改为true。我认为是aspx文件和设计器之间的某种联系。
#5
2
This worked in my case (Visual Studio 2015): Go to Menu and select Options. From the opened window, select ReSharper Ultimate (yours might be different edition) and click Suspend. That will basically suspend all the resharper features. Then click "Resume"
这在我的例子中行得通(Visual Studio 2015):进入菜单并选择选项。在打开的窗口中,选择ReSharper Ultimate(你的版本可能是不同的版本)并单击Suspend。这将基本上暂停所有resharper特性。然后单击“恢复”
That should work. Otherwise, try to clean Resharper cache.
这应该工作。否则,尝试清理Resharper缓存。
#6
0
Suspend and and restarting Reshaper worked. Issue was resolved.
挂起和重新启动的修纸机工作。问题是解决了。