开发者

Visual Studio 2010: move and rename project item in the project hierarchy

Any ideas on how to move (and rename) a Visual Studio project item? I want to move (and rename) an item from one location in the hierarchy to another location in the hierarchy. I want this through automation on the Visual Studio object model, so I will not get int开发者_StackOverflowo trouble with source control (having to checkout and checkin files).


You need to do it in four steps (no other easy way):

  1. From visual studio rename the project (this renames the .VCproj file) (You can do this after step 2 if you want to track vcproj changes in source control).
  2. Remove the project from the solution (without deleting the files).
  3. Using File Explorer change the project directory name, and move it to where you want it (physically). - you can use SVN rename for this step.
  4. From visual studio add an existing project.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜