Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7367c0c

Browse files
committed
Ensure framework assemblies have higher version than those applied to previous frameworks when API or type location changes
Now that roll forward is supported we must version our assemblies when surface area changes or when types are moved. I did a scan of all assemblies that ship an implementation for netcoreapp2.0, have a version >= the version inbox, and the implementation exposes different API or has moved types.
1 parent de66224 commit 7367c0c

File tree

8 files changed

+17
-23
lines changed

8 files changed

+17
-23
lines changed

pkg/Microsoft.Private.PackageBaseline/packageIndex.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,10 +2407,10 @@
24072407
},
24082408
"System.Memory": {
24092409
"InboxOn": {
2410-
"netcoreapp2.1": "4.0.1.0",
2410+
"netcoreapp2.1": "4.1.0.0",
24112411
"monoandroid10": "Any",
24122412
"monotouch10": "Any",
2413-
"uap10.0.16300": "4.0.1.0",
2413+
"uap10.0.16300": "4.1.0.0",
24142414
"xamarinios10": "Any",
24152415
"xamarinmac20": "Any",
24162416
"xamarintvos10": "Any",
@@ -4903,8 +4903,8 @@
49034903
"BaselineVersion": "4.4.0",
49044904
"InboxOn": {
49054905
"netcoreapp2.0": "4.1.1.0",
4906-
"netcoreapp2.1": "4.2.0.0",
4907-
"uap10.0.16300": "4.2.0.0"
4906+
"netcoreapp2.1": "4.3.0.0",
4907+
"uap10.0.16300": "4.3.0.0"
49084908
},
49094909
"AssemblyVersionInPackageVersion": {
49104910
"4.0.0.0": "4.0.0",

src/System.Memory/dir.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<Import Project="..\dir.props" />
44
<PropertyGroup>
55
<AssemblyVersion>4.0.1.0</AssemblyVersion>
6+
<!-- System.Memory has forwarded types into the runtime on netcoreapp/uap
7+
It must win over assemblies versioned at 4.0.* -->
8+
<AssemblyVersion Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap' ">4.1.0.0</AssemblyVersion>
69
<AssemblyKey>Open</AssemblyKey>
710
<IsNETCoreApp>true</IsNETCoreApp>
811
<IsUAP>true</IsUAP>

src/System.Memory/pkg/System.Memory.pkgproj

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@
88
</ProjectReference>
99
<ProjectReference Include="..\src\System.Memory.csproj" />
1010
<InboxOnTargetFramework Include="$(AllXamarinFrameworks)" />
11-
<!-- Since UAP and .NETCoreApp are package based we still want to enable
12-
OOBing libraries that happen to overlap with their framework package.
13-
This avoids us having to lock the API in our NuGet packages just
14-
to match what shipped inbox: since we can provide a new library
15-
we can update it to add API without raising the netstandard version. -->
16-
<ValidatePackageSuppression Include="TreatAsOutOfBox">
17-
<Value>.NETCoreApp;UAP</Value>
18-
</ValidatePackageSuppression>
11+
<InboxOnTargetFramework Include="netcoreapp2.1" />
12+
<InboxOnTargetFramework Include="$(UAPvNextTFM)" />
1913
</ItemGroup>
2014
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
2115
</Project>

src/System.Memory/ref/Configurations.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
<PackageConfigurations>
55
netstandard1.1;
66
netstandard;
7-
netcoreapp;
8-
uap10.0.16299;
97
</PackageConfigurations>
108
<BuildConfigurations>
119
$(PackageConfigurations);
1210
uap;
11+
netcoreapp;
1312
</BuildConfigurations>
1413
</PropertyGroup>
1514
</Project>

src/System.Memory/ref/System.Memory.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.1-Release|AnyCPU'" />
1818
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
1919
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Release|AnyCPU'" />
20-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap10.0.16299-Debug|AnyCPU'" />
21-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap10.0.16299-Release|AnyCPU'" />
2220
<ItemGroup>
2321
<Compile Include="System.Memory.cs" />
2422
</ItemGroup>
25-
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true' and '$(TargetGroup)' != 'uap10.0.16299'">
23+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
2624
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
2725
<ProjectReference Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj" />
2826
</ItemGroup>
29-
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.1' Or '$(TargetGroup)' == 'uap10.0.16299'">
27+
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.1'">
3028
<Reference Include="System.Globalization" />
3129
<Reference Include="System.Runtime" />
3230
<Reference Include="System.Runtime.InteropServices" />

src/System.Memory/src/Configurations.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
<PackageConfigurations>
55
netstandard1.1;
66
netstandard;
7-
netcoreapp-Windows_NT;
8-
netcoreapp-Unix;
9-
uap10.0.16299-Windows_NT;
107
</PackageConfigurations>
118
<BuildConfigurations>
129
$(PackageConfigurations);
1310
uap-Windows_NT;
11+
netcoreapp-Windows_NT;
12+
netcoreapp-Unix;
1413
</BuildConfigurations>
1514
</PropertyGroup>
1615
</Project>

src/System.Memory/src/System.Memory.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.1-Release|AnyCPU'" />
2222
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Debug|AnyCPU'" />
2323
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
24-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap10.0.16299-Windows_NT-Debug|AnyCPU'" />
25-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap10.0.16299-Windows_NT-Release|AnyCPU'" />
2624
<ItemGroup>
2725
<Compile Include="System\SequencePosition.cs" />
2826
<Compile Include="System\ThrowHelper.cs" />

src/System.Threading.Tasks.Extensions/dir.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<Import Project="..\dir.props" />
44
<PropertyGroup>
55
<AssemblyVersion>4.2.0.0</AssemblyVersion>
6+
<!-- System.Threading.Tasks.Extensions has forwarded types into the runtime on netcoreapp/uap
7+
It must win over assemblies versioned at 4.2.* -->
8+
<AssemblyVersion Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap' ">4.3.0.0</AssemblyVersion>
69
<AssemblyKey>Open</AssemblyKey>
710
<IsNETCoreApp>true</IsNETCoreApp>
811
<IsUAP>true</IsUAP>

0 commit comments

Comments
 (0)