I once attempted to change my project’s default namespace in Project -> Project Name Properties -> Default namespace and it messed up so many things I’m now freaked out about trying to do it again (I ended up reverting to the previous namespace).
I don’t remember exactly what got messed up but some of these things were references to resource files and configuration files (this application is already installed on other user’s PCs, and this namespace change would come with an update, and I’m not sure what would happen with their already existing configuration files or settings files since these are XML’s with references to the old namespace).
Is there an easy to follow step by step safe way to perform this change or tool that will help me do it or should I just abandon the idea?
Its never easy, but not bad. I do the following steps and then recompile over and over and fix the remaining errors until it all works.
I change the default namespace in the project.
Use the refactor tool in VS to refactor the existing namespace. It does a decent job.
All resource files will have to be set to “no code generation” then saved and then back to internal/public to get the new namespace.
I do a find on the entire solution looking for the old name space and fix manually. Usually config files.
Fix all T4 templates and run the code generation.
Compile and fix all the missed references.
After it builds and works, you have to test/fix your deployment job/strategy/process. This can be the hardest part depending on the technologies you use or the amount of clients that need updated.
Good luck!