好的,我有:

Visual Studio 2010 RC, W7 x64,启动了一个新的项目类型的Silverlight应用程序。在ASP中托管Silverlight应用程序。NET Web应用程序项目。Silverlight 3.0版。 添加了一个LinqToSQL类,一个WCF服务,一个Winform测试应用程序(解决方案中的项目)和一些类(也作为解决方案中的项目)。

昨天,我突然得到了“断点当前不会被击中”。本文档未加载任何符号。'消息出现在IDE中,但它只影响Web Appliaction,我可以调试Silverlight和Winform应用程序。

我尝试/做了什么来摆脱这条信息:

Reset Visual Studio Settings removed all files in every \Temporary ASP.NET Files Folder (there is one for each 32bit/64bit and for Framework 2.0 and 4.0) tried to debug using Visual Studio Integrated Web server - normally I use IIS, in the project output of the solution I deleted every obj and bin folders in every project folder created a new solution and added all the projects to this new solution deleted the solution suo file created a new ASP.NET Web Application to test if it is a VS-installation issue => I can debug this new project/solution rebooted the machine several times repaired the vs.net installation did an IISReset removed the Web App from IIS used the Create Virtual Directory Button under Project Properties of the Web App to create a new Web App in IIS changed the Framework Version of every project from 3.5 to 4.0 Opened the Solution on my second machine => same behavior crawled Microsoft Connect for bugs / similar issues SPENT 7 HOURS.

这是我人生中第二次这样了。上次我通过删除临时ASP解决了这个问题。NET文件文件夹,但这次我需要你的帮助。


当前回答

对我来说,问题是在调试配置中打开了属性->构建->优化代码复选框。关闭它,重新构建,然后正常调试。

其他回答

我也有同样的问题。跟随对我很有用

进入web应用程序——> Properties——> Silverlight Applications

如果你没有在列表中看到你的Silverlight应用程序,然后点击添加,从“项目”下拉菜单中选择你的Silverlight应用程序,然后添加它。

我通过附加到IIS进行调试。我抓住了生产网。配置一些新的设置,忘记更新网页。配置以启用调试。

确保元素的调试设置为true。换句话说:

<compilation defaultLanguage="c#" debug="true" targetFramework="4.0">

对于我的WPF应用程序,我删除了应用程序文件夹,再次从源代码控制中“获取最新”,并重新构建。现在所有的断点都工作得很好。

每当我遇到这个特殊的错误时,结果是Visual Studio加载程序集的文件夹与web应用程序运行的文件夹不同。

也就是说,运行应用程序的应用服务器

C:\dev\MyApplication\bin 

但是Visual studio正在调试从

C:\dev\MyOtherApplication\bin (or something along those lines, anyway).

注意——由于各种原因,我使用IIS作为应用程序主机进行调试,而不是大多数人使用的小型独立设备。这可能会影响我回答的有用性!

更新:

对于IIS,应用服务器目录(即上面的C:\dev\MyApplication)是为web应用程序配置的物理目录-这可以通过更改应用程序的基本设置来控制。

对于Visual studio,调试目录(例如上面的C:\dev\MyOtherApplication)是svc文件所在的目录,通常与csproj项目文件所在的目录相同。

我也有同样的问题,我正在调试我的项目,我必须右键单击项目并选择“新调试实例”。我只需要这样做一次,然后它就正常工作了。