Using visual studio I'm struggling on how best to setup branching when I need to call a class contained in another project. Assume the following structure of my project:
Solution
- Project 1
- project 2
- Project 3
- Utility
When I branch my projects it will look like this:
Solution
- Project 1-DevBranch
- project 2-DevBranch
- Project 3-DevBranch
- Utility
What's the most efficient way of calling the utility project from each of my branches?
If your Utility project sits outside of your repository, which it should if you're using it within other projects, then consider using a packaging/version solution, such as NuGet.
Setting up your own internal NuGet server is simple, in fact if you're using VSTS/TFS Build, there's also a step in there to generate NuGet packages for you based on that build's artifacts.
With this approach you can install x version of your Utilities package into your projects, regardless of branch, without affecting the Utilities source code.
Calling your utilities classes are done so no differently than if you still had a direct project reference.