[RESOLVED] Project running old code instead of new
I have a solution with a couple different projects. I have been working on them and adding to them for several months. Out of nowhere, one of the subs in my project is not recognizing updated code. I had a for loop in there that was acting funny so I changed something and noticed no difference. I messed with it for a while and decided to just replace everything in that sub with a simple msgbox and it still tries to run the code that was previously there. I have built the solution, rebuilt it, cleaned it, closed and reopened it, removed the bin and obj folders and restarted my computer several times. This is not a server program or anything dealing with IIS or anything like that. Any idea what's going on?
**Edit**
Forgot to select my prefix. I am running Visual Studio 2010 on XP.
Re: Project running old code instead of new
Are you using dll references or project references?
Re: Project running old code instead of new
Close VS, delete the bin folder.
There is a bug where sometimes it will use the old exe, versus the new.
Re: Project running old code instead of new
With the Solution Explorer visible select the current solution name.
Right click and select Configuration Manager.
Make sure the Build checkbox is checked for the project.
If I have a solution with three projects, uncheck build on each one we get the following in the IDE output window upon build complete.
Code:
========== Build: 0 succeeded or up-to-date, 0 failed, 3 skipped ==========
And With all three
Code:
========== Build: 3 succeeded or up-to-date, 0 failed, 0 skipped ==========
So you could make changes in your code and if there is nothing to build you see you old code executing.
Re: Project running old code instead of new
Thank you very much guys! A combination of these finally worked.