名字“###”当前内容中不存在(每个页面上都有这些内容)

发布于 2025-01-05 11:28:51 字数 447 浏览 0 评论 0原文

当打开任何 .cs 页面时,会出现一系列“不存在...”错误,偶尔会出现“您是否缺少 using 指令或程序集引用?”

尽管出现这些错误,但项目可以正常构建和运行。我什至可以单步执行代码。事实上,当它构建时,错误就会消失。

运行结束后,添加新页面将为该页面生成所有相同的消息,并且任何先前打开该会话的页面都会生成相同的消息。

我已经进行了多次搜索,但这些错误似乎相当普遍,而且我还没有找到适合我的答案。

编辑:详细说明它首次出现的时间可能会有所帮助 - 我的同事通过向我们的项目添加一个全新的 aspx 页面进行了一些更改,同时我在单独的页面上修复了代码问题。我们使用 Source Safe 将他的更改添加到我的项目中。自从我们使用 Source Safe 以来,Visual Studio 似乎更改了一些配置。我们的两个项目在不同的机器上运行良好,但现在运行时都没有这些错误。

When any .cs page is opened a slew of "does not exist..." errors show up with an occasional "are you missing a using directive or an assembly reference?"

Although these errors appear, the project can build and run just fine. I can even step through the code. In fact when it is built the errors go away.

Once the run has ended, adding a new page will generate all the same messages for that page and any previous one opened that session.

I have done several searches but these error seems fairly generic and I have not found an answer that works for me just yet.

EDIT: A bit of elaboration on when it first showed up might help - My coworker made some changes by adding a brand new aspx page to our project while I fixed a code issue on a separate page. We used Source Safe go get his changes into my project. Ever since we used Source Safe it seems some configuration was changed with Visual Studio. Both our projects worked fine on separate machine, but now neither runs without these errors.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哭了丶谁疼 2025-01-12 11:28:51

我有同样的问题。我有VS2008专业版。安装 SP1 后,我的 VS2008 副本现在生成大量“不存在”错误。代码绝对完美,错误都是虚假报告。如果我重建,所有错误都会消失。但是,只需在任何打开的 .cs 文件中键入 1 个字符就会返回所有错误。他们等待后不会消失。

其他报告此错误的人表示,双击错误即可使其消失。但对我来说并非如此。

这绝对是 VS2008SP1 中的一个错误。这与后台编译不起作用或其他原因有关。还有其他人有同样的问题吗?

这可能会解决问题:

http://blogs.msdn.com/b/kevinpilchbisson/archive/2008/10/30/hotfix-for-vs2008-sp1-available.aspx

还没有尝试过。

有人遇到这个问题吗?这显然是 VS2008SP1 的一个大问题?

I have the same issue. I have VS2008 professional. After installing SP1, my copy of VS2008 now generates huge amounts of "does not exist" errors. The code is absolutely perfect, the errors are false reports. If I rebuild, all of the errors disappear. However, simply typing 1 character into any open .cs file will bring back all the errors. They do not go away after waiting.

Other people reporting this bug, say that double clicking an error makes it go away. Not the case for me however.

This is deffo a bug in VS2008SP1. It has to do with the background compilation not working or something. Anybody else have the same issue?

This might fix the issue:

http://blogs.msdn.com/b/kevinpilchbisson/archive/2008/10/30/hotfix-for-vs2008-sp1-available.aspx

Haven't tried it yet.

Anybody have this issue, clearly a BIG problem with VS2008SP1?

断舍离 2025-01-12 11:28:51

好的,我修好了。我只是删除了我的网络项目的 SUO 文件。对于这个项目来说,这种奇怪的行为“似乎”已经消失了。

在删除文件之前,我注意到设置了很多断点,并且每个断点都有很多“子断点”。不知道那是怎么回事,但看起来很奇怪。

但是删除 suo 文件就可以解决所有问题。断点现在看起来没问题。休息和步骤都可以。实时语义标记是可以的。至少目前是这样!

如果遇到问题,请尝试删除 suo 文件。并不总是有效,但值得一试......

OK, I fixed it. I simply deleted the SUO file for my web project. The strange behaviour "seems" to have gone now for this project.

Before deleting the file I noticed that there were lots of breakpoints set up and each of these breakpoints had lots of "sub breakpoints". Don't know what that was all about, but it looked odd.

But deleting the suo file tidied all of this up. Breakpoints look OK now. Breaks and steps OK. Live semantic markup is OK. At least for the moment!

If you are getting issues, try deleting the suo file. Won't always work but is worth a try...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文