UpTheCreek
UpTheCreek

Reputation: 32381

Easiest way to change namespace of VS2008 solution?

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 different namespace obviously.

Thanks

Upvotes: 0

Views: 1249

Answers (2)

Sandeep Kumar M
Sandeep Kumar M

Reputation: 3851

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"

Upvotes: 1

Dimi Takis
Dimi Takis

Reputation: 4939

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

Upvotes: 0

Related Questions