“没有为当前文档加载符号” ASP.NET C# 项目
这次该怎么办??
我讨厌 VS 和这种象征性的胡言乱语,它们似乎从来没有两次相同的解决方案(如果它曾经是逻辑的话)。下面的屏幕转储说明了它的内容。
一旦我 F5/启动 Web 项目,断点就会变成黄色。这仅影响正在更改的 aspx.cs 文件。其他 aspx.cs 文件可以有断点。
当我重建/构建时,所有 DLL 和 PDB 文件都创建得很好。它们具有相同的编译时间并且位于同一目录中。 Module-Windows i VS 表示符号已完美加载。好吧,是的,尝试咬我!
我可以说,所有符号都工作得很好,直到我在这些 aspx.cs 文件中进行更改(自从上次以来已经有一段时间了)。如果我重置文件,断点就会起作用。如果我尝试在另一个文件中进行更改,问题就会出现在那里。
它看起来就像符号文件生成器不理解 aspx.cs 文件中所做的更改..
What to do now, this time??
I hate VS and this symbolic gibberish that never seem to have same solution (if it once was logic) twice. The screendump below says what it says.
As soon as I F5/Start the web project, the breakpoint going yellow. This ONLY affect the aspx.cs file that being changed. The other aspx.cs files can have breakpoints.
When I do rebuild/build all DLL and PDB files are created just fine. They have same compile time and are in same directory. Module-Windows i VS says the symbols are loaded perfectly. Well, yeah, try bite me!
I can tell, all symbolic is working just fine, until I was about doing changes inside those aspx.cs files (which was some time ago since last time). If I reset back the file, the breakpoint are working. If I try to make changes in another file, the problem appears there.
It simply appears like that the symbolic file generator don't understand changes maded in aspx.cs files..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你在 web.config 中设置了编译 debug="true" 吗?
http://msdn.microsoft.com/en-us/库/e8z01xdh(VS.80).aspx
Have you got compilation debug="true" set in web.config?
http://msdn.microsoft.com/en-us/library/e8z01xdh(VS.80).aspx
如果您更改了 Web -> 中的起始 URL,有时会发生这种情况。开始行动->起始 URL 到不同的位置。它也可能是网络中的某些东西 ->服务器窗格中的某些内容按预期设置为其他内容。
还要确保 IIS 中的网站(如果您已配置 IIS)位于正确的目录(您的项目在其中构建输出),否则它也无法开始调试。
This sometimes happens if you have changed the starting url in the Web -> Start Action -> Start URL to a different location. It could also be something in the Web -> Servers pane where something is set other as expected.
Also make sure the website in IIS (if you have configured IIS) is located to the right directory (where your project builds the output), otherwise it can't start debugging either.
我找到了一个很好的提示(请参阅此线程中我的评论)。
如上所示,WEBAPP 有一个 _dll 路径。
之所以存在这个 _dll 路径,是因为该项目具有与其他项目共享的 dll 文件。这意味着可以节省空间,并且无需为多个项目保留相同文件的副本。
尽管,
这会引发问题,因为 web 应用程序仍然将文件输出/复制到它自己的子 bin/ 目录中。更糟糕的是,不是所有需要的 dll,这在运行 Web 项目时会出错(由于缺少 xxWeb.dll,它复制到 _dll bin)。
接受使用标准 bin/ 的事实解决了这次的问题。为什么?抱歉,这个问题的答案不会出现在这个帖子中。有想法的人当然会在这里发表评论。一般来说,这不是一个缺点,因为 webb 项目二进制文件应该位于参考树的末尾。
I've found a good hint (see my comment higher in this thread).
The WEBAPP have, as seen above, an _dll path.
This _dll path are there because this project has dll files shared with other projects. This means save space and don't have copies of same files for several projects.
Though,
This raise problems beause the webapp still are output/copy files to it's own sub bin/ directory. And even worse, not ALL needed dlls, which make error when the running web project (due to missing xxWeb.dll, which copies to _dll bin).
Accepting the fact to use standard bin/ fixed the problem this time. Why? The answer on that will not be in this thread, sorry. Someone with an idea would course make a comment here. In general, this isn't a drawback because the webb project binaries should be at the end of reference tree..
打开 Visual Studio 命令提示符
并运行 devenv /resetsettings
Open Visual Studio Command Prompt
and Run devenv /resetsettings