HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to patch AssemblyInfo in TeamCity for .net core 2.1 projects?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
projectscorepatchnetforhowassemblyinfoteamcity

Problem

In the .net core 2.1 project, there is a *.csproj file, that contains assembly information:


    2019.1.15341.0
    2019.1.15341.0
    2019.1.15341


In Standard .net projects there were Properties/AssemblyInfo.cs which contained the Assembly information, but in the .net core, there is no AssemblyInfo.cs, all Assembly information are in the csproj.

How can I change the Assembly Version, File Version in Assembly Info Patcher in TeamCity for the .net core projects?

Solution

You can use File Content Replacer build feature with predefined templates for .NET Core

https://www.jetbrains.com/help/teamcity/file-content-replacer.html#.NET+Core+csproj+templates

Context

StackExchange DevOps Q#4446, answer score: 4

Revisions (0)

No revisions yet.