visual studio 2012表示新C#项目的样式规则的预期选择器

时间:2014-01-13 10:35:46

标签: c# visual-studio-2012 text

我的系统中有VS2005,VS2008,VS2010,VS2012。

这是一个奇怪的问题,我几天以来一直在看。

我在VS2012中打开的任何项目都会发生这种情况

智能感知不起作用

C#文本编辑器显示我的cs文件中的错误。

- >样式规则的预期选择器。

- >区块是未公开的'}'预期

请看屏幕截图。

但是,如果我构建项目,则没有构建错误。

请让我知道如何更正C#文本编辑器

      class Program // class is shown in red
{
    static void Main(string[] args) // every space is shown in red if i however on anu space the tool tip says Missing colon between property and value.
    {
    }

}
    With name spaces i get following error
    using System; // Expected selector for style rule

这只发生在VS2012上。 如果我在VS2010中打开同一个项目,一切都很好。

1 个答案:

答案 0 :(得分:0)

这是因为我安装了VS2012不支持的resharper 5.0 因此VS2012确实用于显示这样的错误。它曾用于编译 我使用了reshaprer 8.0,现在整理出来了