3

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

<PropertyGroup>
    <AssemblyVersion>2019.1.15341.0</AssemblyVersion>
    <FileVersion>2019.1.15341.0</FileVersion>
    <Version>2019.1.15341</Version>
</PropertyGroup>

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?

  • Are you using the dotnet runner to build the project in Team City, if yes then just pass the /p:Version as a command line param and that should version the output libraries – Rajesh Jul 16 '18 at 15:54
3

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

https://confluence.jetbrains.com/display/TCD18/File+Content+Replacer#FileContentReplacer-.NetCorecsprojtemplates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.