I have just completed setting up a simple deploy pipeline for a dotnet core project where I use TeamCity to build the project and run xUnit tests and then Octopus Deploy to deploy.
One of the things I wanted to try out for this project, was to use Cake Build to make a build script. By using Cake, I can set up my entire build process in code, instead of setting up multiple build steps in TeamCity. The advantage is that I can now commit my entire build process to git, and can easily reuse it for my next project. Continue reading “Build, test and deploy a dotnet core website using Cake, TeamCity and Octopus Deploy”
(And handle revision numbers larger than 65534)
When using a system for continuous integration to automatically deploy your application, it is important to know what version of your code is deployed. This tutorial will show you how to automatically set the version number of the deployed .dll.
In a .NET project, the version number is defined in AssemblyInfo.cs, on the format 18.104.22.168. The numbers are MajorVersion.MinorVersion.Build.Revision. The two latter, build and revision numbers, should be set automatically by your CI system on each deploy.
Content of this tutorial
- How to create an MSBuild target to automatically insert the revision number on build
- What to do when your revision numbers are too large to use as .NET revision numbers
- How to use Bamboo to get the latest revision number from Subversion and use this as an input parameter to MSBuild
Continue reading “Use Subversion revision number as version number with MSBuild”