version.props 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <Project>
  2. <PropertyGroup>
  3. <AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
  4. <AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
  5. <AspNetCorePatchVersion>0</AspNetCorePatchVersion>
  6. <PreReleaseLabel>alpha1</PreReleaseLabel>
  7. <PreReleaseBrandingLabel>Alpha 1</PreReleaseBrandingLabel>
  8. <BuildNumber Condition="'$(BuildNumber)' == '' OR '$(UsingLocalBuildNumber)' == 'true'">$([System.DateTime]::Now.ToString('yyMMdd'))-99</BuildNumber>
  9. <VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
  10. <ExperimentalVersionPrefix>0.3.$(AspNetCorePatchVersion)</ExperimentalVersionPrefix>
  11. <VersionSuffix>$(PreReleaseLabel)-$(BuildNumber)</VersionSuffix>
  12. <BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(BuildNumber)</BrandingVersionSuffix>
  13. <!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
  14. <IsServicingBuild Condition=" '$(PreReleaseLabel)' == 'servicing' ">true</IsServicingBuild>
  15. <!-- Run the build with /p:IsFinalBuild=true to produce the product with 'final' branding and versioning -->
  16. <IsFinalBuild Condition=" '$(IsFinalBuild)' == '' ">false</IsFinalBuild>
  17. <IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
  18. <IncludePreReleaseLabelInPackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND ('$(PreReleaseLabel)' == 'servicing' OR '$(PreReleaseLabel)' == 'rtm')">false</IncludePreReleaseLabelInPackageVersion>
  19. <!-- 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" -->
  20. <PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
  21. <PackageBrandingVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
  22. <!-- The version in files -->
  23. <PackageVersion>$(VersionPrefix)</PackageVersion>
  24. <PackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
  25. <SharedFxVersion>$(PackageVersion)</SharedFxVersion>
  26. <!-- Experimental packages which are not truly supported yet. -->
  27. <ExperimentalPackageVersion>$(ExperimentalVersionPrefix)</ExperimentalPackageVersion>
  28. <ExperimentalPackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(ExperimentalVersionPrefix)-$(VersionSuffix)</ExperimentalPackageVersion>
  29. <VersionMetadata Condition=" '$(DotNetProductBuildId)' != '' ">pb-$(DotNetProductBuildId)</VersionMetadata>
  30. <VersionSuffix Condition=" '$(VersionMetadata)' != '' ">$(VersionSuffix)+$(VersionMetadata)</VersionSuffix>
  31. <SharedFxCliBlobChannel>master</SharedFxCliBlobChannel>
  32. <!-- This is used for error checking to ensure generated code and baselines are up to date when we increment the patch. -->
  33. <PreviousAspNetCoreReleaseVersion Condition=" '$(AspNetCorePatchVersion)' != '0' ">$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$([MSBuild]::Subtract($(AspNetCorePatchVersion), 1))</PreviousAspNetCoreReleaseVersion>
  34. </PropertyGroup>
  35. <!-- Run 'dotnet msbuild version.props' to test changes to this file. -->
  36. <Target Name="InspectVersionNumbers">
  37. <Message Importance="High" Text="PackageVersion = '$(PackageVersion)'" />
  38. <Message Importance="High" Text="PackageBrandingVersion = '$(PackageBrandingVersion)'" />
  39. <Message Importance="High" Text="ExperimentalPackageVersion = '$(ExperimentalPackageVersion)'" />
  40. <Message Importance="High" Text="SharedFxCliBlobChannel = '$(SharedFxCliBlobChannel)'" />
  41. </Target>
  42. </Project>