In VS.NET projects, you have to be sure to first close the vs.net solution, then re-generate the code, then reopen the vs.net solution.
Be sure the option 'CleanUpVsNetProjects' is set to true in the preferences.
As this preference option is inherited in every new project, you have to set it in the project properties as well for existing projects. All new projects will inherit this option.