当前位置没有可用的来源

我收到了这个错误。

Locating source for 'C:\Users\cem\Documents\Visual Studio 2008\Projects\CS.Web.Controls\WebCropImage\CropImage.cs'. Checksum: MD5 {20 55 30 34 b8 e3 ee df 89 75 e5 b5 36 b6 13 21} Determining whether the checksum matches for the following locations: 1: C:\Users\sun\Desktop\trunk\CS.WebControls\WebCropImage\CropImage.cs Checksum: MD5 {5d 31 b6 21 f5 1 36 8b c0 25 dd b9 1e ff d7 89} Checksum doesn't match. 2: C:\Users\sun\Downloads\WebCropImage.UI\CropImage.cs Checksum: MD5 {5d 31 b6 21 f5 1 36 8b c0 25 dd b9 1e ff d7 89} Checksum doesn't match. The file 'C:\Users\cem\Documents\Visual Studio 2008\Projects\CS.Web.Controls\WebCropImage\CropImage.cs' does not exist. Looking in script documents for 'C:\Users\cem\Documents\Visual Studio 2008\Projects\CS.Web.Controls\WebCropImage\CropImage.cs'... Looking in the projects for 'C:\Users\cem\Documents\Visual Studio 2008\Projects\CS.Web.Controls\WebCropImage\CropImage.cs'. The file was found in a project: 'C:\Users\sun\Downloads\WebCropImage.UI\CropImage.cs'. The file was found in a project: 'C:\Users\sun\Desktop\trunk\CS.WebControls\WebCropImage\CropImage.cs'. Determining whether the checksum matches for the following locations: 1: C:\Users\sun\Downloads\WebCropImage.UI\CropImage.cs Checksum: MD5 {5d 31 b6 21 f5 1 36 8b c0 25 dd b9 1e ff d7 89} Checksum doesn't match. 2: C:\Users\sun\Desktop\trunk\CS.WebControls\WebCropImage\CropImage.cs Checksum: MD5 {5d 31 b6 21 f5 1 36 8b c0 25 dd b9 1e ff d7 89} Checksum doesn't match. Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\vc7\atlmfc'... Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\vc7\crt'... Looking in directory 'C:\Users\sun\Desktop\trunk\CS.WebControls\'... The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Users\cem\Documents\Visual Studio 2008\Projects\CS.Web.Controls\WebCropImage\CropImage.cs. The debugger could not locate the source file 'C:\Users\cem\Documents\Visual Studio 2008\Projects\CS.Web.Controls\WebCropImage\CropImage.cs'. 

可能它没有找到CropImage.cs或它的不匹配。 我在bin文件夹中添加了CS.Web.UI.CropImage.dll。 不知道为什么它仍然需要.cs

谢谢孙

可能正在发生的事情是,你引用的DLL在你调用时会引发exception。 当您进行调试时,Visual Studio希望您向您显示抛出错误的代码行,但它不知道源的位置。 通常,在我的环境中,它会提示您找到源文件并打开它,以便它可以显示其他调试信息。 我通常会得到你提到的错误,当我在该对话框上按取消时,因为我要么没有源,要么不关心源是什么

打开“解决方案’YourSolutionName’属性页”窗口(转到主菜单:项目 – >属性),然后转到“调试源文件”。 如果您在其中写入了有问题的文件路径,请在“不要查找这些源文件”窗口下进行检查。 如果是,请删除路径并重试。 我认为这可能会解决您的问题。

问候,

对我来说,这是Miro的解决方案+我清理了项目并手动删除了Debug和Release文件夹中的所有文件。 这迫使清洁重建。

我已从Bin / Debug和Bin / Release文件夹中删除了文件。这对我有用。

如果是ASP.Net项目,请删除临时文件。 这不能伤害。 无论何时制作副本,都存在以某种方式它可能不同步的可能性。

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\

就我而言,在我这样做之前,我无法设置任何断点。 错误是在两个MD5语句中给出完全相同的路径,并说校验和不匹配。

在我这样做之后,它仍然告诉我源版本是不同的,但无论如何我选择使用它,我能够逐步完成代码并设置断点。

去搞清楚。

还有一件事:如果你想知道它实际从哪里得到pdb,你可以进入Debug, Windows, Modules ,找到有问题的dll,并在Symbol File列中查看路径。