Skip to content

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.

Follow @CodeOpinion


Using Date Version Numbers for Assemblies in TeamCity

In some projects, I use the AssemblyInfo Patcher build feature to modify the AssemblyInfo.cs’s version information.  Mainly I was just using a static version with the %build_number% suffixed at the end.  Something like 1.2.3.%build_number%.  However, I decided to go with a date version number of YYYY.MM.DD.%build_number% Variables The first thing that caused me an issue was there is no existing system or environment variables defined that provide you with date parts.  I figured this by adding a new build step for creating an environment variable using Service Messages. Service messages are specially constructed pieces of text that are used to pass… Read More »Using Date Version Numbers for Assemblies in TeamCity

Octopus Deploy in Your Cake (C# Make)

I’ve looked at using Cake (C# Make) for build automation in C#.  The basics were to compile a solution/project using MSBuild and then run our automated tests with xUnit. Another common set of tasks that are performed in a build pipeline are: Create a NuGet package Push the NuGet package to Octopus Deploy Create an Octopus Deploy Release NuGet First thing we need to do is to create a NuGet package.  You have a couple options here, one is to create a nuspec and invoke the Nuget.exe to create your package.  I’m going to choose an alternative which is to… Read More »Octopus Deploy in Your Cake (C# Make)

Automating Builds with Cake (C# Make)

I’ve used various build systems for compiling, testing and deploying .NET based applications. TFS, VSTS, AppVeyor, TeamCity have had one thing in common. They all contained the configuration of my build, test and deploy pipeline in their system with no way to extract it. Build as Code Removing the build steps out of your build system and turning into code has two major benefits to me: Build Anywhere: Once you have a build script, you should be able to execute and build it anywhere.  No longer are you relying on the build server and it’s build steps which are specific to that… Read More »Automating Builds with Cake (C# Make)