Working with different versions/branches of the sa

2019-02-09 06:02发布

This is kind of a usability question for using VS2005: I have different branches of the same Visual Studio 2005 solution checked out from version control. The solution and project files are also under version control. On my development workstation, I sometimes have multiple instances of Visual Studio opened on a different version or branch each. They all show up under the same name in the window title and the taskbar, which makes it hard to switch to the correct one etc. (The same goes for the list of recently opened projects in the startup page, but I rarely use that, anyway.)

I tried to find a way to only change the name displayed while not running into too much trouble with source control, but Visual Studio 2005 seems to take the solution name from the name of the SLN file itself, not from some attribute inside of it.

It would already help to have Visual Studio show the full path to the solution file in the title bar, but I haven't found a way to do that, either.

How do you handle different versions from the same solution?

4条回答
Summer. ? 凉城
2楼-- · 2019-02-09 06:38

Same issue here. VS has bad support for equally named solutions in different directories.

A somewhat hacky workaround: http://www.helixoft.com/blog/archives/32

查看更多
祖国的老花朵
3楼-- · 2019-02-09 06:44

Why don't you rename the solution file on your branches, e.g. MySolution-branchXY.sln?

Update:

I'm not sure I understand your comment.

As soon as you have branched your solution, you have two independent versions of each file: one on the trunk (or source branch) and one on the new branch. The two files simply share a common history, but you are free to change them independently on both branches. So you can rename the solution in your branch.

查看更多
够拽才男人
4楼-- · 2019-02-09 06:44

There's an ideal extension for your problem, but you must use at least VS 2010:

http://visualstudiogallery.msdn.microsoft.com/f3f23845-5b1e-4811-882f-60b7181fa6d6

It changes the title bar, so must not rename solutions or files.

I know that is an old post, but perhaps you have now a newer VS version :-)

查看更多
淡お忘
5楼-- · 2019-02-09 06:45

Use the (free) VSCommands plugin:

http://geekswithblogs.net/deadlydog/archive/2011/04/29/friendly-visual-studio-solution-names-for-branches.aspx

I guess it only works when using different folders for different branches (not SVN switching), but still, it's good stuff.

查看更多
登录 后发表回答