Question on Versioning My App
-
I have a framework that I'vev been developing in .Net 4.5.2 over the years. Its all stored in individual repos in GitHub. There are 25 individual projects. Now I want to increment the version to 4.7.2, but when I try to update the versions, it breaks some apps. So, what's the right way to set this all up in GitHub? Would you create a branch for each version?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
I have a framework that I'vev been developing in .Net 4.5.2 over the years. Its all stored in individual repos in GitHub. There are 25 individual projects. Now I want to increment the version to 4.7.2, but when I try to update the versions, it breaks some apps. So, what's the right way to set this all up in GitHub? Would you create a branch for each version?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
If you update the target framework for an assembly, then you need to update the target for anything that references that assembly. That should only be a problem if you're not updating the target for everything, which doesn't sound like the case here. If you start from the bottom up, then you may get errors when you first open a project that targets 4.5.x and references an assembly you've just updated to 4.7.x; but those should go away once you change that project's target framework. If that bothers you, then it may be easiest to work from the top down; start with the applications, then the assemblies they reference, then any transitive references, and so on. Once that's done, you can work your way back up, updating the references at each level.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
If you update the target framework for an assembly, then you need to update the target for anything that references that assembly. That should only be a problem if you're not updating the target for everything, which doesn't sound like the case here. If you start from the bottom up, then you may get errors when you first open a project that targets 4.5.x and references an assembly you've just updated to 4.7.x; but those should go away once you change that project's target framework. If that bothers you, then it may be easiest to work from the top down; start with the applications, then the assemblies they reference, then any transitive references, and so on. Once that's done, you can work your way back up, updating the references at each level.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
The problem us that I still have apps that target my 4.5 assemblies, so I think I need to create copies (new versions) of my assemblies. I was considering create a new branch under MyAssembly called 4.5, then another called called 4.7, etc.
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
The problem us that I still have apps that target my 4.5 assemblies, so I think I need to create copies (new versions) of my assemblies. I was considering create a new branch under MyAssembly called 4.5, then another called called 4.7, etc.
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
If the apps target 4.5, then the assemblies they use need to target 4.5. Creating separate branches might work; but there's a good chance the branches would drift further and further apart over time, making it harder to apply bug fixes to them all. I'd be more inclined to use multi-targeting[^] - have one branch, with one project, building for multiple framework versions. Where needed, you can use conditional compilation to add features to the 4.7 version that won't be included in the 4.5 version. How to multitarget | Develop libraries with the .NET CLI - .NET | Microsoft Learn[^] If you're updating the apps to at least 4.7.2, then it would probably be a good idea to have the libraries target .NET Standard 2.0[^], the last "standard" version supported by .NET Framework.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer