Skip to content

Commit

Permalink
Shorten package version properties (#27784)
Browse files Browse the repository at this point in the history
* Shorten package version properties
- `$(...PackageVersion)` -> `$(...Version)`
- inspired by a similar dotnet/efcore change
- aligns names with Arcade SDK, meaning our values apply consistently

* Remove unused PublishSymbols.proj and related property
- restore Arcade's control of `$(MicrosoftSymbolUploaderBuildTaskVersion>)`
- would otherwise result in a version downgrade

* Update `$(MicrosoftNetCompilersToolsetVersion)` to match Arcade's value
- avoid using an older toolset
- now successfully overriding Arcade value

* Avoid an odd `CS8603` error
- delete the unused `GetOptionalProperty(...)` method

* Correct an unintentional change reading package metadata
- `%(ReferencePathWithRefAssemblies.NuGetPackageVersion)` is the correct name
  • Loading branch information
dougbu authored Nov 13, 2020
1 parent f83817e commit 44c0e66
Show file tree
Hide file tree
Showing 68 changed files with 426 additions and 503 deletions.
10 changes: 5 additions & 5 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
<PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>

<SiteExtensionPackageVersion>$(VersionPrefix)</SiteExtensionPackageVersion>
<SiteExtensionPackageVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix.Replace('.','-'))</SiteExtensionPackageVersion>
<SiteExtensionVersion>$(VersionPrefix)</SiteExtensionVersion>
<SiteExtensionVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix.Replace('.','-'))</SiteExtensionVersion>

<PackageVersion Condition=" '$(PackageVersion)' == '' ">$(Version)</PackageVersion>

Expand All @@ -49,7 +49,7 @@
<TargetingPackVersion>$(SharedFxVersion)</TargetingPackVersion>
<TargetingPackVersion Condition=" ! $(IsTargetingPackBuilding) ">$(TargetingPackVersionPrefix)</TargetingPackVersion>

<PackageVersion Condition=" '$(NoSemVer20)' == 'true' ">$(SiteExtensionPackageVersion)</PackageVersion>
<PackageVersion Condition=" '$(NoSemVer20)' == 'true' ">$(SiteExtensionVersion)</PackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -155,7 +155,7 @@
<!-- Only update the default runtime version for preview builds. -->
<DefaultRuntimeFrameworkVersion Condition="'%(TargetFramework)' == '$(KnownAppHostPackOrFrameworkReferenceTfm)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppRuntimeVersion)</DefaultRuntimeFrameworkVersion>
<!-- Only update the targeting pack version for preview builds. -->
<TargetingPackVersion Condition="'%(TargetFramework)' == '$(KnownAppHostPackOrFrameworkReferenceTfm)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppRefPackageVersion)</TargetingPackVersion>
<TargetingPackVersion Condition="'%(TargetFramework)' == '$(KnownAppHostPackOrFrameworkReferenceTfm)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppRefVersion)</TargetingPackVersion>
</KnownFrameworkReference>

<KnownFrameworkReference Condition="'$(UseAspNetCoreSharedRuntime)' != 'true'" Remove="Microsoft.AspNetCore.App" />
Expand All @@ -169,7 +169,7 @@

<!-- Track compiler separately from Arcade.-->
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
Version="$(MicrosoftNetCompilersToolsetPackageVersion)"
Version="$(MicrosoftNetCompilersToolsetVersion)"
PrivateAssets="all"
IsImplicitlyDefined="true" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/ReferenceResolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Steps for adding a new package dependency to an existing project. Let's say I'm
1. Add the package to the .csproj file using `<Reference Include="System.Banana" />`
2. Add an entry to [eng/Dependencies.props](/eng/Dependencies.props) e.g. `<LatestPackageReference Include="System.Banana" />`
3. If this package comes from another dotnet team and should be updated automatically by our bot&hellip;
1. Add an entry to [eng/Versions.props](/eng/Versions.props) like this `<SystemBananaPackageVersion>0.0.1-beta-1</SystemBananaPackageVersion>`.
1. Add an entry to [eng/Versions.props](/eng/Versions.props) like this `<SystemBananaVersion>0.0.1-beta-1</SystemBananaVersion>`.
2. Add an entry to [eng/Version.Details.xml](/eng/Version.Details.xml) like this:

```xml
Expand Down
2 changes: 1 addition & 1 deletion eng/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ and are generated based on the last package release.

<!-- Get versions. -->
<LatestPackageReference Update="@(LatestPackageReference)">
<Version>$(%(VersionName)PackageVersion)</Version>
<Version>$(%(VersionName)Version)</Version>
</LatestPackageReference>

<!--
Expand Down
64 changes: 0 additions & 64 deletions eng/PublishSymbols.proj

This file was deleted.

Loading

0 comments on commit 44c0e66

Please sign in to comment.