I have a solution for Xamamrin.iOS and Xamarin.Android application with structure as below,

  • Solution Root
    • Common Project
    • Xamarin.iOS Project
    • Xamarin.Android Project

I need to branch both iOS and Android projects, but I am facing a problem, when I branch the Xamarin.iOS project alone for example, I get in my workspace the Xamarin.iOS project alone, so I am missing the dependency it has on the Common Project. And since both the iOS and Android projects evolves independently I don't want to branch the whole solution, I want to keep branching specific to each platform.

How do you recommend I implement branching for this case? I am using TFS 2015 source control.

  • Will the common project also evolve with the platform specific projects? Or is it safe to assume the "common" project is pretty stable, and that changes to the platform projects truly are limited to the platform projects? – Greg Burghardt Apr 1 '20 at 17:44
  • The common project normally will evolve when a new need rises that will be applied to both platforms projects. It mainly contains DTOs, and utilities. – Sisyphus Apr 1 '20 at 18:52

This is a case where the philosophy that TFVC uses to manage branches might actually be better than other version control systems.

Just make the iOS and Android project directories their own branches. If you need to isolate changes in the Common project, make that project directory a branch as well.

The solution itself remains a regular unbranched directory in TFVC. The iOS and Android project directories can be converted to branches. You'll just need to make sure the solution folder itself is not also inside a branch.

Failing that, make the Common project its own solution, and create a NuGet package out of it. Then create separate solutions for iOS and Android so you can branch them properly. Use Semantic Versioning of your Common library NuGet package.

  • This is the initial solution I mentioned in the question, the problem is I branched iOSProj and gave it a name iOSProj-branch1 for example, and downloaded it to my workspace. What TFVC did is that it is now giving me a Solution with two branches (two folders\projects) for the iOS version, iOSProj and iOSProj-branch1, and when I open the solution in VS it will be pointing to iOSProj so I I have no access to iOSProj-branch1 unless I open it independently which will lead to losing access to Common Project. – Sisyphus Apr 1 '20 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.