Does anyone know a quick and foolproof way of changing the namespace of a VS2008 solution/projects? In other words - I have a solution, and want to copy this as a template for a different application, but need differen开发者_StackOverflowt namespace obviously.
Thanks
Renaming Solution name will not affect namespace of projects in it.
If you want to change namespace - right click project file -> select "properties" -> select "Application" tab -> Change "default namespace".
Only best fool proof way in my opinion
- Open solution in VS2008
- Open Solution Explorer
- Right Click Solution
- Select "Rename"
Open the search & replace dialog:
Shift+Ctrl H
Find what: namespace YOUROLDNAMESPACE
Replace what: namespace YOURNEWNAMESPACE
Look in: Entire solution
Find options:
Tick Match case Tick Match whole word
Push button "Replace All"
HTH Dimi
精彩评论