views:

239

answers:

6

For one of the solutions, I don't see the Clean Solution option neither in the context menu when I right click on the solution name in the Solution Explorer nor in the Build menu. When I make any changes to the project and debug, VS never hits the break point and I get the "The breakpoint will not currently be hit. The source code is different from the original version." message. My understanding is that I need to clean the solution.

For other solutions, I do see the Clean solution and I don't have the same issue.

+1  A: 

I guess you are running an older code version than the one you want to debug on. Rebuild the project(s), paying attention to dependencies. Use the "Rebuild" feature.

thelost
I have used rebuild, but that doesn't help
Have you re-deployed your app after re-build ? Also, make sure the projects build successfully.
thelost
Yes, the projects build successfully and yes I have redeployed the app
A: 

If it's a Web application project, just clean it yourself by nuking all DLLs in the bin. Then rebuild. I assume it builds without errors?

Ted
It builds without errors and it's not a WAP.
I think you mean to say that it is a Web application project (with projects, solutions, etc.) as opposed to the wonked Web site project...I can never keep the terminology straight myself....just read another comment further down. Yes you're using Web site projects because no "project".
Ted
A: 

You can also clean using devenv /clean SolnConfigName SolutionName in the command line environment.

Here is the reference: http://msdn.microsoft.com/en-us/vstudio/aa718635.aspx

Shaji
When I run this, I get 0 succeeded and 0 failed, although the command itself did not throw an error.
A: 

If you're running a web site, as apposed to a web application project, you probably don't have an actual solution, or even a project file.

For a web site, you need to rebuild the website (from the build menu), or manually delete all of the dlls to accomplish the same thing.

Edit:

How are you debugging? Are you using Cassini (the built in visual studio debugger), or attaching to an IIS process?

I would also try this:

Go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files and delete the folder that has the same name as your website.

AaronS
There is a sln file, but yes there is no project files, so this appears to be a website and not a WAP. I did rebuild the website but that doesn't help
See my updated response...
AaronS
I am using Cassini and I did delete the temp files but that didn't help
A: 

Finally had to create a brand new solution and add the projects from the older solution to the newly created one. Not sure what the problem was, but this helped.

A: 

I have the same problem, and I don't know how to add the Clean button from Custom Menu.

Peter Lee