assembly info patching

cedd's Avatar


08 Jan, 2020 01:46 PM

Hi There

I have started using assembly info patching and I am basically very happy with it.

However, I would like to know how the version number is worked out, please could you let me know?

And it would be good to be able to incorporate one of the automatic semantic versioning things (They tend to work off pull requests and commit messages I think).



  1. Support Staff 1 Posted by Feodor Fitsner on 09 Jan, 2020 04:35 AM

    Feodor Fitsner's Avatar

    Hi Cedd,

    Take a look at this section about build versioning:

    For semantic versioning you may want to look at GitVersion:

  2. 2 Posted by cedd on 09 Jan, 2020 10:49 AM

    cedd's Avatar

    Cool, so the assemblyinfo patching version (`{version}`), can be specified in the appveyor.yml with:

    version: '1.0.{build}'

    And if I wanted to use GitVersion, how would I set `{version}`? I think it is an environment variable, so could I set that in init, assuming that init happens before the assembly patching?

  3. Support Staff 3 Posted by Feodor Fitsner on 09 Jan, 2020 06:17 PM

    Feodor Fitsner's Avatar

    In the version format expression you can use any environment variable. Therefore you can define a new variable with version during install phase which runs after clone and before assembly patching, example pseudo-yaml:

    - GitVersion ...
    - ps: $env:MY_VERSION = ...
      patch: true
      assembly_version: '${MY_VERSION}'
  4. 4 Posted by cedd on 10 Jan, 2020 09:21 AM

    cedd's Avatar

    Thanks feodor, thats very helpful ...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac