Skip to content

Commit a55e6c6

Browse files
ViktorHoferericstj
andauthored
Use live dependencies for netcoreapp3.0 depencies (#48176) (#48344)
* Use live dependencies for netcoreapp3.0 depencies (#48176) * Use live dependencies for netcoreapp3.0 deps * Disable package validation for two packages * Add baselines for touched packages * Build packages on allconfigurations leg only * Fix inbox version of System.Text.Encodings.Web Co-authored-by: Eric StJohn <[email protected]>
1 parent d163459 commit a55e6c6

File tree

11 files changed

+100
-39
lines changed

11 files changed

+100
-39
lines changed

src/libraries/Microsoft.Extensions.Logging.EventSource/Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33

44
<PropertyGroup>
55
<NoWarn>$(NoWarn);PKG0001</NoWarn>
6+
<PackageVersion>5.0.1</PackageVersion>
7+
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.1</AssemblyVersion>
8+
<SkipValidatePackage>true</SkipValidatePackage>
69
</PropertyGroup>
710
</Project>

src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
$(TargetFramework.StartsWith('net4'))">
2929
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj" />
3030
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
31+
</ItemGroup>
32+
33+
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
34+
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
35+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
3136
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
3237
</ItemGroup>
3338

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<Import Project="..\Directory.Build.props" />
3+
<PropertyGroup>
4+
<PackageVersion>5.0.1</PackageVersion>
5+
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.1</AssemblyVersion>
6+
<SkipValidatePackage>true</SkipValidatePackage>
7+
</PropertyGroup>
8+
</Project>

src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or
2121
$(TargetFramework.StartsWith('net4'))">
2222
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
23+
</ItemGroup>
24+
25+
<!-- NetCoreApp3.0 needs to use the same version of dependencies as .NETStandard. -->
26+
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
2327
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
2428
</ItemGroup>
2529

src/libraries/System.Reflection.MetadataLoadContext/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Open</StrongNameKeyId>
5+
<PackageVersion>5.0.1</PackageVersion>
6+
<AssemblyVersion>5.0.0.1</AssemblyVersion>
57
</PropertyGroup>
68
</Project>

src/libraries/System.Reflection.MetadataLoadContext/src/System.Reflection.MetadataLoadContext.csproj

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,9 @@
150150
'$(TargetFramework)' == 'netcoreapp3.0'">
151151
<Reference Include="System.Collections" />
152152
<Reference Include="System.Collections.Concurrent" />
153-
<Reference Include="System.Collections.Immutable" />
154153
<Reference Include="System.Diagnostics.Debug" />
155154
<Reference Include="System.IO.FileSystem" />
156155
<Reference Include="System.Memory" />
157-
<Reference Include="System.Reflection.Metadata" />
158156
<Reference Include="System.Resources.ResourceManager" />
159157
<Reference Include="System.Runtime" />
160158
<Reference Include="System.Runtime.Extensions" />
@@ -163,8 +161,22 @@
163161
</ItemGroup>
164162
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) or
165163
$(TargetFramework.StartsWith('net4'))">
166-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
167-
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
168164
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
169165
</ItemGroup>
166+
167+
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
168+
<Choose>
169+
<When Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
170+
<ItemGroup>
171+
<Reference Include="System.Collections.Immutable" />
172+
<Reference Include="System.Reflection.Metadata" />
173+
</ItemGroup>
174+
</When>
175+
<Otherwise>
176+
<ItemGroup>
177+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
178+
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
179+
</ItemGroup>
180+
</Otherwise>
181+
</Choose>
170182
</Project>

src/libraries/System.Text.Json/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Open</StrongNameKeyId>
5-
<PackageVersion>5.0.1</PackageVersion>
6-
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.1</AssemblyVersion>
5+
<PackageVersion>5.0.2</PackageVersion>
6+
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.2</AssemblyVersion>
77
<SkipValidatePackage>true</SkipValidatePackage>
88
</PropertyGroup>
99
</Project>

src/libraries/System.Text.Json/src/System.Text.Json.csproj

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,8 @@
242242
<Reference Include="System.Reflection.Primitives" />
243243
<Reference Include="System.Resources.ResourceManager" />
244244
<Reference Include="System.Runtime" />
245-
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
246245
<Reference Include="System.Runtime.Extensions" />
247246
<Reference Include="System.Text.Encoding.Extensions" />
248-
<Reference Include="System.Text.Encodings.Web" />
249247
<Reference Include="System.Threading" />
250248
<Reference Include="System.Threading.Tasks" />
251249
<Reference Include="System.Threading.Tasks.Extensions" />
@@ -256,7 +254,22 @@
256254
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
257255
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" />
258256
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
259-
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj" />
260257
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" Condition="'$(TargetFramework)' == 'net461'" />
261258
</ItemGroup>
259+
260+
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
261+
<Choose>
262+
<When Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
263+
<ItemGroup>
264+
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
265+
<Reference Include="System.Text.Encodings.Web" />
266+
</ItemGroup>
267+
</When>
268+
<Otherwise>
269+
<ItemGroup>
270+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
271+
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj" />
272+
</ItemGroup>
273+
</Otherwise>
274+
</Choose>
262275
</Project>

src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static Type GetMemberType(MemberInfo memberInfo)
319319

320320
return memberInfo is PropertyInfo propertyInfo
321321
? propertyInfo.PropertyType
322-
: Unsafe.As<FieldInfo>(memberInfo).FieldType;
322+
: Unsafe.As<FieldInfo>(memberInfo)!.FieldType;
323323
}
324324

325325
// Cache the lookup from object property name to JsonPropertyInfo using a case-insensitive comparer.
@@ -390,13 +390,13 @@ private static bool PropertyIsOverridenAndIgnored(MemberInfo currentMember, Dict
390390
Debug.Assert(currentMember is PropertyInfo || currentMember is FieldInfo);
391391
PropertyInfo? currentPropertyInfo = currentMember as PropertyInfo;
392392
Type currentMemberType = currentPropertyInfo == null
393-
? Unsafe.As<FieldInfo>(currentMember).FieldType
393+
? Unsafe.As<FieldInfo>(currentMember)!.FieldType
394394
: currentPropertyInfo.PropertyType;
395395

396396
Debug.Assert(ignoredProperty is PropertyInfo || ignoredProperty is FieldInfo);
397397
PropertyInfo? ignoredPropertyInfo = ignoredProperty as PropertyInfo;
398398
Type ignoredPropertyType = ignoredPropertyInfo == null
399-
? Unsafe.As<FieldInfo>(ignoredProperty).FieldType
399+
? Unsafe.As<FieldInfo>(ignoredProperty)!.FieldType
400400
: ignoredPropertyInfo.PropertyType;
401401

402402
return currentMemberType == ignoredPropertyType &&

src/libraries/libraries-packages.proj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
<ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" Condition="'$(BuildAllOOBPackages)' == 'true'" />
1919
<ProjectReference Include="$(MSBuildThisFileDirectory)*\pkg\**\*.pkgproj" Condition="('$(BuildAllConfigurations)' == 'true' or '$(DotNetBuildFromSource)' == 'true') And '$(BuildAllOOBPackages)' == 'true'" />
2020
<!-- If setting BuildAllOOBPackages to false, add bellow the individual OOB packages you want to continue to build -->
21+
<ProjectReference Condition="'$(BuildAllConfigurations)' == 'true'" Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.EventSource\pkg\Microsoft.Extensions.Logging.EventSource.pkgproj" />
22+
<ProjectReference Condition="'$(BuildAllConfigurations)' == 'true'" Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Primitives\pkg\Microsoft.Extensions.Primitives.pkgproj" />
23+
<ProjectReference Condition="'$(BuildAllConfigurations)' == 'true'" Include="$(MSBuildThisFileDirectory)System.Reflection.MetadataLoadContext\pkg\System.Reflection.MetadataLoadContext.pkgproj" />
24+
<ProjectReference Condition="'$(BuildAllConfigurations)' == 'true'" Include="$(MSBuildThisFileDirectory)System.Text.Json\pkg\System.Text.Json.pkgproj" />
2125
<!-- This is merge marker 1 to help automerge -->
2226
<!-- This is merge marker 2 to help automerge -->
2327
<!-- This is merge marker 3 to help automerge -->

0 commit comments

Comments
 (0)