.NET Framework方法将引发消息“当前位置没有可用的源代码".关于调试 [英] .NET Framework Method throws Message "There is no source code available for the current location" on debugging
问题描述
你好
我的一个应用程序中有以下代码.
I have the following code in one of my application.
System.Collections.Generic.List< CustomClass> obj = new System.Collections.Generic.List< CustomClass>();
obj.Insert(0,newCustomClassObject);
System.Collections.Generic.List<CustomClass> obj=new System.Collections.Generic.List<CustomClass>();
obj.Insert(0,newCustomClassObject);
当我调试代码时,当我从上面的插入语句中按F10时,会出现一个消息框,提示当前位置没有可用的源代码".在Visual Studio 2005中.
While I am debugging the code and when i press F10 from the insert statment above I get a message box which says "There is no source code available for the current location" in Visual Studio 2005.
我已经看到一些帖子,其中指出未更新pdb文件时会发生此异常.但是,由于这是一个执行的.NET框架方法,因此实际上将存在一个pdb文件.
I have seen some posts which says this exception occurs when the pdb file is not updated. But since this is a .NET framework method which is executed will there really be a pdb file.
此致
Midhun
推荐答案
您好,请尝试以下操作:
Hello, try the following:
1)清洁溶液
2)关闭Visual Studio
2) Close Visual Studio
3)转到项目目录,然后删除 bin 和 obj 目录
3) Go to the project's directory and delete the bin and obj directories
4)再次打开您的解决方案,并确保选择了 Debug 编译器配置文件
4) Open your solution again and be sure you have choosed the Debug compiler profile
5)重建解决方案
此致
米格尔.
这篇关于.NET Framework方法将引发消息“当前位置没有可用的源代码".关于调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!