.csproj version patching ignoring my props file

CattieCat's Avatar


16 Jun, 2021 11:48 PM

Version patching stopped working after refactor, I suspect it failed to find the file or the <version> property, but cannot tell what is configured wrong.

From appveyor.yml:
  patch: true
  file: 'Directory.Build.props'
  version: '{version}'
  package_version: '{version}'
  assembly_version: '{version}'
  file_version: '{version}'
  informational_version: '{version}'

From Directory.Build.props:
<!-- Versioning -->
    <Version Condition="'$(Version)' == ''">1.2.0</Version>

appveyor.yml and Directory.Build.props are both in root directory. Using file: '**\*.csproj;**\*.props' or empty <Version /> didn't help either.

No version patching related logs except this line
Patching .NET Core project files

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Jun, 2021 03:03 AM

    Feodor Fitsner's Avatar

    Could you drop me a link to the last working and the first broken builds?

  2. 2 Posted by CattieCat on 17 Jun, 2021 05:00 PM

    CattieCat's Avatar

    Hi Feodor, sure! Thanks for jumping in.
    We start to see failure from this one https://ci.appveyor.com/project/CodeCyclone/powerbi-powershell/builds/39618172.
    Above one has a known issue with wrong props path in appveyor.yml, so we fixed that in this build but version patching issue is the same: https://ci.appveyor.com/project/CodeCyclone/powerbi-powershell/builds/39631885

    Last working build:

  3. Support Staff 3 Posted by Feodor Fitsner on 18 Jun, 2021 02:34 AM

    Feodor Fitsner's Avatar

    I think it can't traverse Directory.Build.props XML document because of root namespace: https://github.com/microsoft/powerbi-powershell/blob/55424586c27b46...

    Before refactoring the document didn't have a namespace: https://github.com/microsoft/powerbi-powershell/blob/10d8a1e5552372...

  4. 4 Posted by CattieCat on 18 Jun, 2021 10:18 PM

    CattieCat's Avatar

    Confirmed problem solve after I removed the namespace in <Project>. Thank you!

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