MSBump
MSBump copied to clipboard
csproj file settings always use the 'Debug' configuration even on Release builds
I have an issue with the build configuration conditional checks not being respected:
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.