BalassaMarton / MSBump

MSBuild task that bumps the version of a Visual Studio 2017 project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

csproj file settings always use the 'Debug' configuration even on Release builds

mramsey161 opened this issue · comments

I have an issue with the build configuration conditional checks not being respected:

1.0.1.0 True 1.0.1.0 True

Should be pretty straightforward but when I switch between Debug and Release builds in VS2017 or using "dotnet build -c Release" its only ever the version for Debug that's incremented.

Am I doing something wrong ?

And a great tool by the way I've been struggling to get incremented versions in Docker containers for OpenShift deployments.

Sorry, code not displaying correctly
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> <Version>1.0.1.0</Version> <BumpRevision>True</BumpRevision> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)'=='Release'"> <Version>1.0.1.0</Version> <BumpRevision>True</BumpRevision> </PropertyGroup>

Hi, unfortunately MSBump rewrites the first Version tag inside the first PropertyGroup. It has no concept of conditionals or other MSBuild features. When choosing the configuration to use, it just reads the Configuration property from the project, but otherwise performs no processing on the file.