BalassaMarton / MSBump

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nothing seems to be happening

jaredthirsk opened this issue · comments

I added the nuget package (2.3.0 because 2.3.1 doesn't seem to be on nuget), created a msbump file and also added to my csproj file:

<PropertyGroup>
    <Version>1.0.1.10</Version>
    <PackageVersion>1.0.1.10</PackageVersion>
</PropertyGroup>

<Target Name="MyBeforeBuild" BeforeTargets="Build" Condition=" '$(Configuration)'=='Release' ">
    <BumpVersion ProjectPath="$(ProjectPath)" BumpRevision="True">
        <Output TaskParameter="NewVersion" PropertyName="Version" />
        <Output TaskParameter="NewVersion" PropertyName="PackageVersion" />
    </BumpVersion>
  </Target>
  
   <PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
    <BumpLabel>dev</BumpLabel>
  </PropertyGroup>
  
   <PropertyGroup Condition=" '$(Configuration)'=='Release' ">
    <BumpRevision>True</BumpRevision>
	<BumpResetLabel>dev</BumpResetLabel>
  </PropertyGroup>

MyProjectName.msbump:

{
  Configurations: {
    "Debug": {

    },
    
    "Release": {
      BumpRevision: true
    }
  }
}

How is it wired into the msbuild process? I searched my hard disk for MSBump.standalone.targets because I was going to try adding that to my csproj manually but it was not found. I see the MSBump.dll in my c:\Users\username.nuget\packages\msbump\2.3.0\tasks\net46.

I tried building from VS2017 and dotnet build -c Release.

Update: after doing a manual upgrade of my csproj from the old format to the new one starting with

<Project Sdk="Microsoft.NET.Sdk">

It is bumping the version.

@jaredthirsk The nuget version does not require you to add anything to the project file, except for adding PrivateAssets="All" to the <ProjectReference> element to make it a development dependency.