开发者

Easiest way to change namespace of VS2008 solution?

开发者 https://www.devze.com 2023-01-10 08:05 出处:网络
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,

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号