version.props 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <Project>
  2. <PropertyGroup>
  3. <AspNetCoreMajorVersion>2</AspNetCoreMajorVersion>
  4. <AspNetCoreMinorVersion>2</AspNetCoreMinorVersion>
  5. <AspNetCorePatchVersion>1</AspNetCorePatchVersion>
  6. <PreReleaseLabel>servicing</PreReleaseLabel>
  7. <PreReleaseBrandingLabel></PreReleaseBrandingLabel>
  8. <BuildNumber Condition="'$(BuildNumber)' == '' OR '$(UsingLocalBuildNumber)' == 'true'">$([System.DateTime]::Now.ToString('yyMMdd'))-99</BuildNumber>
  9. <VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
  10. <ExperimentalVersionPrefix>0.2.$(AspNetCorePatchVersion)</ExperimentalVersionPrefix>
  11. <AspNetCoreMinorVersion Condition="'$(BuildServerIIS21)' == 'true'">1</AspNetCoreMinorVersion>
  12. <!-- ANCM versioning is intentionally 10 + AspNetCoreMajorVersion because earlier versions of ANCM shipped as 8.x. -->
  13. <AspNetCoreModuleVersionMajor>1$(AspNetCoreMajorVersion)</AspNetCoreModuleVersionMajor>
  14. <AspNetCoreModuleVersionMinor>$(AspNetCoreMinorVersion)</AspNetCoreModuleVersionMinor>
  15. <AspNetCoreModuleVersionRevision>$(AspNetCorePatchVersion)</AspNetCoreModuleVersionRevision>
  16. <VersionSuffix>$(PreReleaseLabel)-$(BuildNumber)</VersionSuffix>
  17. <BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(BuildNumber)</BrandingVersionSuffix>
  18. <!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
  19. <IsServicingBuild Condition=" '$(PreReleaseLabel)' == 'servicing' ">true</IsServicingBuild>
  20. <!-- Run the build with /p:IsFinalBuild=true to produce the product with 'final' branding and versioning -->
  21. <IsFinalBuild Condition=" '$(IsFinalBuild)' == '' ">false</IsFinalBuild>
  22. <IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
  23. <IncludePreReleaseLabelInPackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND ('$(PreReleaseLabel)' == 'servicing' OR '$(PreReleaseLabel)' == 'rtm')">false</IncludePreReleaseLabelInPackageVersion>
  24. <!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
  25. <PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
  26. <PackageBrandingVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
  27. <!-- The version in files -->
  28. <PackageVersion>$(VersionPrefix)</PackageVersion>
  29. <PackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
  30. <SharedFxVersion>$(PackageVersion)</SharedFxVersion>
  31. <!-- Experimental packages which are not truly supported yet. -->
  32. <ExperimentalPackageVersion>$(ExperimentalVersionPrefix)</ExperimentalPackageVersion>
  33. <ExperimentalPackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(ExperimentalVersionPrefix)-$(VersionSuffix)</ExperimentalPackageVersion>
  34. <VersionMetadata Condition=" '$(DotNetProductBuildId)' != '' ">pb-$(DotNetProductBuildId)</VersionMetadata>
  35. <VersionSuffix Condition=" '$(VersionMetadata)' != '' ">$(VersionSuffix)+$(VersionMetadata)</VersionSuffix>
  36. <SharedFxCliBlobChannel>release/$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</SharedFxCliBlobChannel>
  37. <!-- This is used for error checking to ensure generated code and baselines are up to date when we increment the patch. -->
  38. <PreviousAspNetCoreReleaseVersion Condition=" '$(AspNetCorePatchVersion)' != '0' ">$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$([MSBuild]::Subtract($(AspNetCorePatchVersion), 1))</PreviousAspNetCoreReleaseVersion>
  39. </PropertyGroup>
  40. <!-- Run 'dotnet msbuild version.props' to test changes to this file. -->
  41. <Target Name="InspectVersionNumbers">
  42. <Message Importance="High" Text="PackageVersion = '$(PackageVersion)'" />
  43. <Message Importance="High" Text="PackageBrandingVersion = '$(PackageBrandingVersion)'" />
  44. <Message Importance="High" Text="ExperimentalPackageVersion = '$(ExperimentalPackageVersion)'" />
  45. <Message Importance="High" Text="SharedFxCliBlobChannel = '$(SharedFxCliBlobChannel)'" />
  46. </Target>
  47. </Project>