7

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. I have added CS.Web.UI.CropImage.dll in the bin folder. Not sure why it still needs a .cs

Thanks Sun

user575219
  • 2,346
  • 15
  • 54
  • 105
  • Is this an ASP.NET project? A WebForms project? A WinForms project? A WPF project? When does the error message appear? Don't add stuff manually to the bin folder. The IDE does that for you. Add references and never poke around in the bin folder - that is asking for trouble. – Anders Marzi Tornblad Jan 09 '12 at 16:28
  • 2
    not a good question - you're not really being specific about WHEN this happens! That said - my guess is that an exception is occurring in the CropImage library, that there's a PDB for that in the BIN, hence the debugger knows that the error occured in code contained in a file called CropImage.cs. This isn't a runtime error - it's environment asking you to point it to the code file so it can show you where the error is. – Andras Zoltan Jan 09 '12 at 16:30

5 Answers5

18

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,

Aoi Karasu
  • 3,730
  • 3
  • 37
  • 61
Miro Malek
  • 269
  • 2
  • 7
  • 1
    [Equivalent answer with an illustration](http://stackoverflow.com/questions/314329/getting-rid-of-there-is-no-source-code-available-for-the-current-location/20096642#20096642). – Peter Mortensen Jan 27 '14 at 18:12
2

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

Anthony Shaw
  • 8,146
  • 4
  • 44
  • 62
1

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

0xDEAD BEEF
  • 2,074
  • 7
  • 31
  • 46
  • Sometimes a Clean Solution does not clear all the files and a manual delete of the bin directory is the only way to guarantee a "clean soution". – Francis Feb 02 '17 at 17:01
0

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

Thakur Rock
  • 515
  • 5
  • 7
0

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.

toddmo
  • 20,682
  • 14
  • 97
  • 107