0
votes

I see this warning when running any project on my development PC. I have narrowed the problem down to my Windows profile. If I give myself a new windows profile then the problem is resolved i.e. I can step through the code properly.

I have read many questions on here:

"The breakpoint will not currently be hit. The source code is different from the original version." What does this mean? Breakpoint will not currently be hit the breakpoint will not currently be hit no symbols loaded

Is there a folder that I can clear out in my Windows profile that may resolve this problem?

Yesterday I made a change to Visual Studio to always open in admin mode. When I opened Visual Studio this morning I was prompted to save changes to DEVENV, which created a solution file. I bet this is what caused it.

All the code is vb.net and this affects asp.net and application clients.

2

2 Answers

1
votes

I found I was referencing a dll in a different project which had been updated rather than the actual project itself which would mean that the dll referenced was not the dll in the project itself. I sorted it by referencing the project.

0
votes

You've not provided much information for us to be able to help: For example, what type of project are you working on? In which language? On which version of VS and Windows.

This error states that the source code you're working on differs from the executable you're debugging. Its highly unlikely to be related to your Windows profile and running VS as admin should be unnecessary to resolve this issue.

I recommend making sure that your project is building correctly. If your build is failing, your binaries aren't being updated. If your source code layout differs from the binaries you're debugging, then the breakpoints you're trying to set on your source won't match-up with the layout of your binary code and you'll see the error you describe above.

You might want to hit Build | Clean on your project which should delete the contents of your obj and bin folders. Alternatively, you could manually delete these folders using explorer/command-line if you prefer. You should then be unable to debug as your binaries should no longer be removed.

Then rebuild your solution and make sure that there were no errors or significant warnings.

Once your build is working correctly and you're debugging against the correct binaries, you should be able to set breakpoints correctly and debug to your heart's content ;)

HTH.

[Update 1]

You may be using "Windows Profile" incorrectly: Your "Windows Profile" is the environment unique to your user account. Its unlikely that this issue is related to your user profile. It's VERY likely that you're trying to debug a build of the app that is different from the source you're looking at.

Make sure your project's Debug settings are set to "Start Project" and not run a specific exe. enter image description here