开发者

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

开发者 https://www.devze.com 2023-01-28 18:03 出处:网络
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 aut

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

精彩评论

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

关注公众号