0

Ok, so I've got our TeamCity Build Server building a new shiny ASP.NET Core 1.0 web application. I can Build, Publish and Deploy all from TeamCity, great.

I am struggling to see how I can use TeamCity to Version the build, and not just the version suffix suffix either. So I can see that the version is set in the project.json file using the version property.

I want to use TeamCity Parameters like this:

enter image description here

Then use these to create a build number like so:

enter image description here

So I did try setting the version in project.json file to just * but the application wouldn't build using the CLI tools.

The best I could achieve is getting a version like this 1.0.0-1.1.26 using the version-suffix flag to replace * with 1.1.26 (the TeamCity build number).

SimonGates
  • 5,961
  • 4
  • 40
  • 52

1 Answers1

2

There is issue to make dotnet CLI more build friendly https://github.com/dotnet/cli/issues/2676. It is still open.

But for now you might want to use this one https://github.com/PaulTrampert/dotnet-version/