奇怪:C#类型或命名空间名称找不到 - 构建成功找不到、奇怪、名称、类型

2023-09-03 05:47:21 作者:情起缘落

我有一个奇怪的错误显示在我的项目时,它是在VS2012 IDE中打开。到处都在这里我使用另一个引用的项目突然说了类型或命名空间名称无法找到。并以说,我的意思是它在红色与错误的文本强调,当我在它悬停。在智能感知不为code工作。 BUT(这里是怪异的一部分),错误不会在错误控制台中显示出来,并生成项目,并运行正常。

I have a weird error showing up in my project when it is open in the VS2012 IDE. Everywhere where I make use of another referenced project it suddenly says "Type or Namespace name could not be found". And by "says", I mean it has the text underlined in red with the error when I hover over it. The intellisense doesn't work for that code. BUT (and here's the weird part), the errors do not show up in the error console and the project builds and runs fine.

我可以通过code甚至调试和步骤,它工作完全正常。因此,在运行项目中引用的罚款,但在设计时IDE无法找到它。这个工作在过去的2周,然后才突然响起了一点疯狂。这真是烦人,因为我是垃圾的编码没有智能感知!

I can even debug and step through the code and it works perfectly fine. So at runtime the project is referenced fine but at design time the IDE can't find it. This worked for the past 2 weeks, and only then suddenly went a little bonkers. It's really annoying because I am rubbish at coding without intellisense!

有没有人见过这样的事,或有什么建议?

Has anybody ever seen anything like this or have any suggestions?

推荐答案

我发现这是一个已知的问题VS2012。检查一下你是如何建立,64位或32位。它不会与64位的工作,但它会与32位。它会说东西不见了和设计将无法正常工作,但是该程序将会运行得很好。我听说新的VS更新已尚未发布将修复它。

I have found this is a known problem with VS2012. Check to see how you are building, 64 bit or 32 bit. It won't work with 64 bit but it will with 32 bit. It will say things are missing and design will not work, however the program will run fine. I have heard the new VS update that hasn't been released yet will fix it.

 
精彩推荐