--- layout: post title: "Day 6" subtitle: "1.0.0-alpha.1" date: 2014-12-30 11:59:59 author: "Robert Rouhani" header-img: "img/bg/day6.png" --- It took almost my entire day, but I revamped a lot of the structure around SharpNav and released version 1.0.0-alpha.1! Since it's already so late, this post is going to be a really short one as I want to go to bed right now. NuGet won't support Semantic Versioning 2.0.0 until Nuget 3.0, which should be released in the coming weeks, so on NuGet this version appears as 1.0.0-alpha. ![NuGet Release](/img/post/day6/nuget.png) I removed as many of the commited binaries in the repository as I could, relying on NuGet to download dependencies. SharpNav.Examples still needs to be converted, but seeing as the only dependency is on OpenTK (which I have installed in the GAC on my machine), it should be fine until I fix it tomorrow. Switching to NuGet also broke my Travis CI builds and sent me an email per commit following the change. This is something I'll fix tomorrow, I've already tested everything to work locally (and ran my limited number of unit tests). C#'s built-in `Version` class describes an assembly version with 4 integers, Major.Minor.Revision.Build. This isn't quite the same as SemVer, but can easily be mapped onto it. Major, Minor, and Revision stay the same (though Revision is called Patch in SemVer), and the Build number becomes a special number that keeps track of pre-releases. I arbitrarily chose the following ranges for 'Build' numbers: - 0 <= alpha < 100 - 100 <= beta/rc < 200 - 200 = final release I chose this instead of incrementing by one whenever any pre-release was made because this way a consumer of the C# version number can still programmatically differentiate alpha, beta, and final releases. I doubt very many people are going to actually use this, but it's important that I differentiate versions with the C# version number because of how C# references assemblies with a 'Fully Qualified Name' that includes the assembly name, version, culture, a strong-name key token. NuGet may support SemVer, but the GAC doesn't. On that note, I also did some work to ensure installing SharpNav to the GAC would work properly given the different integrations I have. Each integrated version gets signed by a unique [strong-name key][1], that way the assembly's [Fully Qualified Name][2] differs by it's `PublicKeyToken`. Since the GAC stores assemblies by their Fully Qualified Name, it's safe to install multiple copies of SharpNav.dll to the GAC and have them exist side-by-side. The way this all works is pretty cool, I'd recommend reading into it if you've got some spare time. That's all I'm going to say about it for the time being. I spent most of today researching all of these things as well as figuring out the nuances of MSBuild to get my special multi-configuration projects working. I could easily write a post twice as long as this just on NuGet and how it used to suck pretty hard, still sucks a little bit, and probably won't suck that much in a year or two. It's around 4:30am my time, so I think some sleep is in order. [1]: http://msdn.microsoft.com/en-us/library/xwb8f617.aspx [2]: http://msdn.microsoft.com/en-us/library/k8xx4k69.aspx