简体   繁体   English

当前位置没有可用的来源

[英]There is no source available for the current location

I am getting this error.我收到此错误。

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'.

Probably it is not finding a CropImage.cs or its getting a mismatch.可能它没有找到 CropImage.cs 或者它不匹配。 I have added CS.Web.UI.CropImage.dll in the bin folder.我在 bin 文件夹中添加了 CS.Web.UI.CropImage.dll。 Not sure why it still needs a .cs不知道为什么它仍然需要 .cs

Thanks Sun谢谢孙

Open "Solution 'YourSolutionName' property pages" window (go to main menu: Project->Properties) and then go to "Debug Source Files".打开“解决方案‘YourSolutionName’属性页”窗口(转到主菜单:项目->属性),然后转到“调试源文件”。 Check under "Do not look for these source files" window if you have your problematic file path written in it.如果其中写入了有问题的文件路径,请检查“不要查找这些源文件”窗口。 If yes, delete the path and try again.如果是,请删除路径并重试。 I think this might solve your problem.我认为这可能会解决您的问题。

Regards,问候,

Likely what is happening, is that DLL that you've referenced is throwing an exception when you're calling it.可能发生的情况是,您引用的 DLL 在您调用它时抛出异常。 When you're debugging, Visual Studio would like you show you the line of code that is throwing the error, but it doesn't know where the source is.在调试时,Visual Studio 希望您向您展示引发错误的代码行,但它不知道源在哪里。 Usually, in my environment, it will prompt you to locate the source file and open it so that it can show you additional debug information.通常,在我的环境中,它会提示您定位源文件并打开它,以便它可以向您显示其他调试信息。 I would usually get the error you mention, when I press cancel on that dialog since I either don't have the source, or don't care what the source is我通常会收到您提到的错误,当我在该对话框上按取消时,因为我要么没有源,要么不在乎源是什么

For me it was Miro's solution + I cleaned project and manually removed all filed from Debug and Release folders.对我来说,这是 Miro 的解决方案 + 我清理了项目并手动删除了 Debug 和 Release 文件夹中的所有文件。 This forces clean rebuild.这会强制干净重建。

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

If is an ASP.Net project, delete the temporary files.如果是 ASP.Net 项目,请删除临时文件。 This cannot hurt.这不能伤害。 Any time a copy is made, the possibility exists that somehow it can get out of sync.每次制作副本时,都可能会以某种方式失去同步。

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

In my case, before I did that, I could not set any breakpoints.就我而言,在我这样做之前,我无法设置任何断点。 The error was giving the exact same path in both MD5 statements, and saying the checksum didn't match.错误是在两个 MD5 语句中给出了完全相同的路径,并说校验和不匹配。

After I did that, it still told me the source version was different, but I choose to use it anyway, and I was able to step through the code and set breakpoints.在我这样做之后,它仍然告诉我源版本不同,但我还是选择使用它,并且我能够单步执行代码并设置断点。

Go figure.去搞清楚。

And one more thing: If you want to know where it's getting the pdb from actually, you can go into Debug, Windows, Modules , and find the dll in question, and see the path in the Symbol File column.还有一件事:如果您想知道它实际上从哪里获取 pdb,您可以进入Debug, Windows, Modules并找到有问题的 dll,然后查看Symbol File列中的路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM