Auto Versioning in Visual Studio 2017 (.NET Core)

后端 未结 16 1434
一整个雨季
一整个雨季 2020-11-28 18:45

I have spent the better part of a few hours trying to find a way to auto-increment versions in a .NETCoreApp 1.1 (Visual Studio 2017).

I know the the AssemblyInfo.cs

16条回答
  •  醉梦人生
    2020-11-28 19:15

    Thanks to @joelsand for pointing me in the right direction.

    I had to change his answer slightly as when the DevOps Build ran, I got the following exception

    The specified version string does not conform to the recommended format - major.minor.build.revision

    I had to add the $(BUILD_BUILDNUMBER) at the end of major.minor.build section. To de-duplicate the actual version, I also use a version-prefix:

    
        1.0.3
        $(VersionPrefix)-local
        $(VersionPrefix)-$(BUILD_BUILDNUMBER)
    
    

提交回复
热议问题