C# Version - increase the last number

Markus Freitag 3,786 Reputation points

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


Like this V1.0.0.000001
Like this V1.0.0.000002
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,663 questions
{count} votes

Accepted answer
  1. DaisyTian-1203 11,616 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:

    If you meet error like

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful