C# Version - increase the last number

asked 2020-09-16T07:46:04.97+00:00
Markus Freitag 2,936 Reputation points

Hello,
How can I have the compile number counted up and output at each compile?

25068-increase-compile.png

Like this V1.0.0.000001
Next
Like this V1.0.0.000002
Next
Like this V1.0.0.000003

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,169 questions
{count} votes

Accepted answer
  1. answered 2020-09-17T02:07:01.913+00:00
    DaisyTian-1203 11,506 Reputation points

    Method 1: Use [assembly: AssemblyVersion("1.0.*")] in AssemblyInfo.cs then mark or delete the old AssemblyFileVersion and AssemblyVersion

    Methos 2: Right click your project and select Properties in the popup menu, click the Assembly Infomation on the Application tab. Set the Assembly Version and File Version like below picture shown:
    25355-capture.png

    If you meet error like
    25421-capture1.png

    Please set <Deterministic>true</Deterministic > to <Deterministic>false</Deterministic > in ProjectName.csproj file.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful