snippetMinor
How to patch AssemblyInfo in TeamCity for .net core 2.1 projects?
Viewed 0 times
projectscorepatchnetforhowassemblyinfoteamcity
Problem
In the .net core 2.1 project, there is a
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?
*.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
https://www.jetbrains.com/help/teamcity/file-content-replacer.html#.NET+Core+csproj+templates
File Content Replacer build feature with predefined templates for .NET Corehttps://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.