Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't overwrite pinned assembly versions in servicing #84079

Merged
merged 6 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@
<_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsWindowsDesktopApp>
<_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsAspNetCoreApp>
<_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(IsNetCoreAppRef)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true</_AssemblyInTargetingPack>
<!-- Assembly version do not get updated in non-netfx ref pack assemblies. -->
<AssemblyVersion Condition="'$(_AssemblyInTargetingPack)' != 'true'">$(MajorVersion).$(MinorVersion).0.$(ServicingVersion)</AssemblyVersion>
<!-- The assembly version gets updated when
- it isn't already set (i.e. it could be pinned to a specific version for .NET Framework compatibility) and
- the assembly isn't part of a targeting pack (always true for .NET Framework). -->
<AssemblyVersion Condition="'$(AssemblyVersion)' == '' and '$(_AssemblyInTargetingPack)' != 'true'">$(MajorVersion).$(MinorVersion).0.$(ServicingVersion)</AssemblyVersion>
ericstj marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<!-- AssemblyVersion is frozen to that which originally shipped in 2.1 -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
Comment on lines -4 to -5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library only ships inside the Microsoft.NETCore.App shared framework. I assume we don't need to pin its assembly version anymore?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it once had a package and this is left over from that time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the expected side-effect of removing AssemblyVersion from here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assembly will version in the same way as every other assembly that ships only in the targeting packs (N.0.0.0 which remains frozen in servicing).

<StrongNameKeyId>ECMA</StrongNameKeyId>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<SupportedOSPlatforms>windows</SupportedOSPlatforms>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser;android;ios;tvos</UnsupportedOSPlatforms>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<!-- Since this assembly version is pinned, we don't want to validate that it matches
the expected assembly version on the targeting pack. -->
<SkipValidateAssemblyVersion>true</SkipValidateAssemblyVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Management/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<SupportedOSPlatforms>windows</SupportedOSPlatforms>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.3.0</AssemblyVersion>
ericstj marked this conversation as resolved.
Show resolved Hide resolved
<StrongNameKeyId>ECMA</StrongNameKeyId>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
ericstj marked this conversation as resolved.
Show resolved Hide resolved
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.1;netstandard2.0</TargetFrameworks>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Runtime.Caching/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Speech/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this assembly is inbox in desktop, do not version it unless you
plan on shipping a new desktop version out of band. Instead add API
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard2.0'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
<SupportedOSPlatforms>windows</SupportedOSPlatforms>
</PropertyGroup>
Expand Down