C# versioning
Hey there, so for starters I'm sorry if this is a silly question. I'm a non .NET web development but I help out with a non profit organisation who uses it. At the moment we're trying to implement SemVer as an upgrade over the old and very arbitrary versioning system.
Say we build our release candidate and give it to the beta testers, who don't find any issues so we're ready to make it a public release. In accordance with SemVer we need to change the version from for example 1.23.0-beta.4 to 1.23.0. Is there a way of storing version so that we don't need to rebuild this working build? We don't want to accidentally have any weird stuff happen and break the release by rebuilding it.
The executable which we distribute is generic and downloads the correct version of the software from our server based on the user's role (alpha tester/beta tester/normal user) so its important that we can programmatically differentiate between whether a build is alpha/beta/or not.
Thanks!
8 Replies
If rebuilding a beta version into a full release breaks things, it wasn't ready for a full release in the first place
From what I've heard sometimes stuff magically doesn't work
We had a pretty experienced developer who just resigned who was adamant about this
Maybe if you're working with some hot-glued mess of legacy .NET Framework cobbled together with Pascal
Pretty much yeah!
The project has been ongoing since 2013
We're currently working on refactoring so hopefully things will be a bit better
So ignoring my situation, how would you be executing this?
Well, ideally, a rebuild with a new version number
Barring that... read the version number from some file on runtime?
Yeah thats an idea
Thanks
If you distribute the library as a NuGet package you can version the package independently of the version of the assembly inside it. Not saying this is something you should do but it would prevent having to rebuild the assembly you have tested and are happy with. You just update the nuspec file and rebuild the NuGet package zip file.
I'll ask about this - not entirely sure what we do with regards to that