We're making the switch from SourceGear Vault to TortoiseSVN with VisualSVN for Visual Studio integration - absolutely love it. However, there are multiple class libraries that we reference in multiple different applications that aren't a part of the working copy root in any of the applications. What's the best way to deal with this so that we can continue to utilize Visual Studio integration, but still keep various class libraries located outside of each project/application's root? SourceGear doesn't have an issue with this.
It is possible to add class libraries separately just using TortoiseSVN in explorer, but there's no ability to commit changes to anything outside of the working copy from within Visual Studio; neither are there the VisualSVN "traffic lights" indicating status for these outside of working copy class libraries.
By the way, we're also going with the "one repository with many projects" route as opposed to multiple repositories, especially as that is how we have worked for years to this point.
UPDATE:
I re-read some things that I had looked at before and discovered that svn:externals don't just refer to using code in different repositories, but can also be used to use multiple working copies in VisualSVN.
See http://www.visualsvn.com/support/topic/00007/ and http://svnbook.red-bean.com/en/1.2/svn.advanced.externals.html
However, is this the best way to deal with this issue? There's a good thread that goes through things, but doesn't completely resolve things.
Therefore, use svn:externals or not? Use multiple repositories or not? Again, for years we have referenced the code in shared class libraries amongst multiple solutions/applications and this works for us. Now how best to make this work with VisualSVN?
Found the best answers here:
Referenced Projects
Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. If you want every user to have the same layout, you can define the svn:externals properties.
And here:
Include a common sub-project
Sometimes you will want to include another project within your working copy, perhaps some library code. You don't want to make a duplicate of this code in your repository because then you would lose connection with the original (and maintained) code. Or maybe you have several projects which share core code. There are at least 3 ways of dealing with this.
I understand it's been more than ten years since you asked this question, but I am glad to tell you that there was progress in implementing support for multiple working copies in the VisualSVN plug-in.
VisualSVN 7.1 and 6.5 support multiple working copies within a single solution. The new functionality is available to Visual Studio 2019 and 2017 users.
Download the latest VisualSVN builds from the main download page. Please also see the article KB7: Using Multiple Working Copies in VisualSVN.
Related
I have a few (3) core projects I want to share across many solutions (12+).
So, say I have 12 websites and they use some shared back end core code (in this case I'm not talking about shared js, css or views - I'm talking about business objects, entity stuff, etc.).
I need to be able to identify which site has which version of the shared code in dev, test, prod, etc. so a developer can get the website code and get the right version of the shared code to develop or patch the website.
And then the MS build server needs to know which version of the shared code to get for the deployment.
To solve this, I'm seeing people branch that core code - which seems absurd to do 12+ times. (I do expect to branch the core code sometimes for things like hot fixes and long running projects.)
I'm also seeing people copy DLLs of the core code and check those in.
I would think I would list the dependencies for my solutions based on TFS label names somewhere so developers can easily get the apps running with the right code and given a tfs label the build server can get the code for the website and the proper version of the core code. I'm using TFS & VS 2013 at the moment too, so there's that.
So, is there a way to do this that's straightforward, supportable/scale-able and intuitive? Thanks - Peter
Labels in TFS is very limited. For example once the label created you couldn't change and update it. If one of your core projects updated, did you need to create a new label for it. If you did and use the new label for one of your solution. However you found there are some bugs in this update, you need a newer update of your core project to fix the bug. Then a newer label created, you need to manually maintain the dependencies which seems not to be an easy job.
Moreover how to list the dependencies for your solutions based on TFS label names? TFS don't have this built-in option, seems the only way is store it in a txt or someother files and check in the source control. Every time the developer open a website application need to check it first and get label from server to their workspace and work on it.
Usually the purpose of sharing code between projects is reducing maintenance. There’s two main code sharing paths: source and binary. The difference between them you could take a look at this blog: Code Sharing in Team Foundation Server
Sharing code between products is a primary cause of quality erosion and elevated bug counts. I would recommend you to build separately and sharing binary output through NuGet which use preferable.
Also take a look below similar questions:
Sharing code between solutions in TFS
TFS 2010 Branch Across Team Projects - Best Practices
I work on several different software projects and I started building up some generic libraries with utilitarian functions that I use in all of them. Recently I had three or four projects going at once at different physical locations and it got painful to synchronize the libraries manually.
So I figured I should create a repository for these libraries so I can access them from anywhere. I'll sit down one final time to synchronize them between projects, commit them, and from now on I'll have the repository to make sure I keep things straight and keep the most recent version of the library working with all the relevant projects.
Because I'm working in Visual Studio 2010 I went with AnkhSVN. To my dismay, it does not seem to allow you to manage only projects within a solution---only the entire solution!
I go by the instructions here; they're pretty clear. There is some minor confusion in that an SVN "project" is not a Visual Studio "project", apparently.
So I select a project in the Solution Explorer, right click on it, and select "Add Selected Projects to Subversion...". The window that pops up uses the solution name for the field labeled "project name". That's a sign of trouble, but I can manually change it to be the actual project name. Then I can choose a repository, and create a folder for this project. So far so good.
But then for "local folder" it's a drop down list with the default selection being the location of the solution, and the only other options are moving farther up the tree. If I leave it as is and hit OK, AnkhSVN wants to put the entire solution in that directory I created (assumingly only for the selected project).
In fact if I select "Add Solution to Subversion..." I get an identical window.
I want Subversion manage only certain projects within a solution. With local solutions, that's how I make sure I keep my libraries universal; instead of just linking to the build I add the entire source to each solution so changes are "global". Now I need to do this for solutions at physically different locations and apparently AnkhSVN won't let me do this? Is it broken or is this by design?
There is no 'standard' way of providing a UI to handle this situation, but if you just checkout your working copies and bring all of the projects in a single layout AnkhSVN will just provide all the tools to work on this project.
The really hard problem -where we as AnkhSVN team are working on- is how we can provide the necessary UI to work with this kind of layouts easily. There is no easy way to layout your project if it is made out of different trees that live in different parts of your harddrive.
A workaround for some projects might be to create a parent working copy with externals (svn:externals) pointing towards the separate projects. In that case checking out the rooot project will automatically bring in the other projects.
It looks like this has been known since 2008 and the developers don't think it's important enough of an issue.
http://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=582&dsMessageId=152095
You can proceed in this way.
Before make a solution with all projects follow the steps.
For each projects add them separately to svn (each projects with
it's own directory structure in svn)
Make a solution
Add each desired projects to solution.
In this way you can commit changes just to desired project and commits are not bundle to solution.
Later on you can easily separate projects from solution (delete, move to other solutions, etc).
So I'm creating my project using a git source control and using some libraries from another repositories. But I'm also developer of this libraries and I want edit/debug them in my project so I can add it to project not alike binary dll but alike another project.
I found this article : Multiple projects in a solution vs. multiple projects in source control
But I'm working on Windows and usually just using Tortoise Git. I guess that will be really hard to configure it such way.
There is another idea. Do not add solution file to version control and create some readme how another developers must construct project and it's dependents.
Maybe someone already met or even solved such trouble, I'm interesting to know any solutions and variants for it.
Thank you.
At a company I used to work for, we ended up putting the projects themselves into different repo's which made managing them easier as opposed to 1 solution. We then wrote a batch file to simply put all the pieces back together and compile it correctly (just compiling the component Projects). This may not work for everyone but it is just a suggestion.
The reason we did this was because opening the solution in VS was getting to be very memory intensive for the machines and was becoming a giant mess of files.
Also this can be used so that teams only work on their specified software and can really only talk to the other components. This is a great way to enforce 3-tier/n-tier architecture design since you separate the projects out and let teams/developers only worry about what they're working on (not really fool proof but it helps).
In our company we usually have a solution consist of several projects, mostly dozen or several dozens. Those are coming from different repos 'cause some of those are general purpose libs, frameworks etc. We, however, use SVN with VS AnkhSVN plugin so there are completely no issues with commiting changes to more than one repo.
My assumption for you is to check whether Git VS plugins could work with seeral repos in one solution. More info on Git VS plugins here: Using Git with Visual Studio
BTW, accroding to 'one or many repos' discussion - we create one repo for a project. So if there are several parts of the project and some of those existed before and will most probably keep being after - those should not be placed in the project repo. Should something great be born within the project and we do believe this will overlive it - we could always migrate repo subtree to an independent SVN repo.
We currently have a local TF Server here in our company, and we are about to make a subset of our projects open source (via Codeplex), but we are having problems mixing two Team Foundation Servers in the same solution. Looks like Visual Studio can't be connected to many TF Servers at the same time. What's the best way to deal with that?
Solution 1: Bind Open source projects to Codeplex only, and proprietary projects to local only. Bind and un bind projects depending where are you connected --> Looks like VS doesn’t like the idea. Projects loose bindings and start to behave strangely.
Solution 2 Bind all to local and use another solution for the open source subset --> Team Explorer Workspace manager avoid you using overlapping local folder trees, even on different servers, so it is not an option.
Solution 3 Bind all to local using TFS. Use another source control like SVN for the open source subset. It looks it will become messy easily, but we don't have a lot of options.
Someone with open source projects has faced a problem like this??
I would stick to one single authorative repository or you'd end up with a version hell at some point.
If you intend to have external developers contributing code on the codeplex side you will need to merge your changes with theirs and also integrate their changes on your own internal TFS server.
It's safer to have one single authoritive repository and just create snapshots for milestone releases on the other.
You could do your fine grained check-ins and modifications on your internal repository and periodically integrate/merge them to the codeplex code-tree. However what works on one codebase may not work so well on the other after integrating, the sooner you integrate changes the better (don't work on your own isolated branch too long).
I just wonder what the best approach is to have multiple users work on a Project in Visual Studio 2005 Professional.
We got a Solution with multiple Class Libraries, but when everyone opens the solution, we keep getting the "X was modified, Reload/Discard?" prompt all the time. Just opening one project is an obvious alternative, but I find it harder to use as you can't just see some of the other classes in other projects that way.
Are there any Guidelines for Team Development with VS2005 Pro?
Edit: Thanks. The current environment is a bit limited in the sense there is only 1 PC with RDP Connection, but that will change in the future. Marking the first answer as Accepted, but they are all good :)
What you need is source control.
You should definitely not open the same files over the network on multiple machines. For one thing, Visual Studio has safeguards in place to prevent you from modifying certain files during a build, but it has none of that that will prevent others from modifying the same files over the network.
By setting up source control, each developer will have a separate copy of the files locally on his or her developer machine, and periodically communicate with the source control system to check in/commit changes. After that, other developers can ask for the latest updates when they're ready to retrieve them.
Use source control to keep a central repository of all your code. Then each user checks out their own copy of the source code and works locally. Then submits only the code that changed.
https://en.wikipedia.org/wiki/Version_control
A number of people have recommended using source control and I totally agree. However you also need do the following.
Exclude your personal options files from the repository (eg your .suo files)
Exclude your App.config files from the repository. - Not entirely but you need to have a Template.App.config. You commit that instead, and only copy your App.config into the Template.App.config when you make structural changes. That was each user has their own individual config for testing.
There are probably some other files worth excluding (obj directories and so forth) but thats all I can think of right now.
Peter
This might sound snide, but if you're opening up the solution from a shared location then you're doing something wrong. If that's the case then you should start using source control (something like Subversion) and have everyone check out a copy of the project to work on.
However if you're already using source control, then it might be a symptom of having the wrong things checked in. I find that you only need the sln, and the vcproj under source control.
Otherwise I don't know...
You should definitely, definitely be working with source control!
This will help stop the collisions that are occurring. Also, if you are making changes to the shared projects this often that it is a problem, then also ensure that all code is tested before getting checked in (otherwise they may bust someone else's build), but make sure they check in often (or time gained from not dealing with prompts will be lost in merging conflicts) :)