There is no source available for the current location

前端 未结 5 393
终归单人心
终归单人心 2021-01-03 01:56

I am getting this error.

Locating source for \'C:\\Users\\cem\\Documents\\Visual Studio 2008\\Projects\\CS.Web.Controls\\WebCropImage\\CropImage.cs\'. Checks         


        
相关标签:
5条回答
  • 2021-01-03 02:35

    Open "Solution 'YourSolutionName' property pages" window (go to main menu: Project->Properties) and then go to "Debug Source Files". 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,

    0 讨论(0)
  • 2021-01-03 02:35

    If is an ASP.Net project, delete the temporary files. 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.

    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.

    0 讨论(0)
  • 2021-01-03 02:43

    Likely what is happening, is that DLL that you've referenced is throwing an exception when you're calling it. 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. 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

    0 讨论(0)
  • 2021-01-03 02:59

    For me it was Miro's solution + I cleaned project and manually removed all filed from Debug and Release folders. This forces clean rebuild.

    0 讨论(0)
  • 2021-01-03 03:01

    I have removed files from Bin/Debug and Bin/Release folder.Which worked for me.

    0 讨论(0)
提交回复
热议问题