From 441c0fea2b7693c9de99ddeef5cff96911e13253 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 15 Jun 2021 13:45:44 +0200 Subject: [PATCH 1/2] Add NetCoreAppCurrent config to where it's missing This is addressing the following scenarios in order: - When there is a netcoreapp3.1 or net5.0 asset available in the lib, also add a NetCoreAppCurrent configuration to avoid PackageReferences to libraries that are inbox in net6.0 but not in previous .NetCoreApp versions. Examples are M.Win32.Registry which will be inbox soon. - When there's a NetCoreAppCurrent config in the lib but not in the ref, add it there as well to always resolve the ref of the current version. - When there are NetCoreAppCurrent rid specific configuration in the lib not a non-rid configuration, add one so that P2Ps from rid-less NetCoreAppCurrent configs in other projects, pick the NetCoreAppCurrent config from the lib and the ref. --- ...icrosoft.Extensions.Logging.Console.csproj | 9 +++-- ...soft.Extensions.Logging.EventSource.csproj | 11 +++++- .../Microsoft.Extensions.Primitives.csproj | 11 +++--- .../ref/Microsoft.Win32.SystemEvents.csproj | 5 ++- .../src/Microsoft.Win32.SystemEvents.csproj | 2 +- .../ref/System.Data.Odbc.csproj | 5 ++- ...System.Diagnostics.DiagnosticSource.csproj | 5 ++- ...DirectoryServices.AccountManagement.csproj | 6 +++- ...DirectoryServices.AccountManagement.csproj | 2 +- .../System.DirectoryServices.Protocols.csproj | 6 +++- .../System.DirectoryServices.Protocols.csproj | 2 +- .../ref/System.DirectoryServices.cs | 36 +++++++++---------- .../ref/System.DirectoryServices.csproj | 2 +- .../src/System.DirectoryServices.csproj | 2 +- .../src/System.IO.Hashing.csproj | 2 +- ...stem.Reflection.MetadataLoadContext.csproj | 5 ++- .../Directory.Build.props | 2 ++ .../ref/System.Runtime.Caching.csproj | 3 +- .../System.Speech/ref/System.Speech.csproj | 6 +++- .../System.Speech/src/System.Speech.csproj | 2 +- 20 files changed, 83 insertions(+), 41 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj index 844061afb56f2..765b78729358e 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461 true @@ -8,7 +8,7 @@ - + @@ -21,6 +21,11 @@ + + + + + diff --git a/src/libraries/Microsoft.Extensions.Logging.EventSource/ref/Microsoft.Extensions.Logging.EventSource.csproj b/src/libraries/Microsoft.Extensions.Logging.EventSource/ref/Microsoft.Extensions.Logging.EventSource.csproj index 80dba555dd552..99dea9fad13d1 100644 --- a/src/libraries/Microsoft.Extensions.Logging.EventSource/ref/Microsoft.Extensions.Logging.EventSource.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.EventSource/ref/Microsoft.Extensions.Logging.EventSource.csproj @@ -1,17 +1,26 @@ - netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461 + + + + + + + + + diff --git a/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj b/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj index e349c19f02dc6..5a2a2ec763637 100644 --- a/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj +++ b/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj @@ -1,15 +1,18 @@ - netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461 - - - + + + + + + diff --git a/src/libraries/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.csproj b/src/libraries/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.csproj index 176e30b0cbec3..60b298c4b14d5 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.csproj +++ b/src/libraries/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.csproj @@ -1,12 +1,15 @@ - netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461 enable + + + diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj index 97d46a0fca441..2929b90c61a3a 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj +++ b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj @@ -2,7 +2,7 @@ true enable - $(NetCoreAppCurrent)-windows;netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0;net461 diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj index 9b14848ef4242..3f557d722422e 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj +++ b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj @@ -1,12 +1,15 @@ - netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461 enable + + + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj index 8ff018779a3d7..11c17335ed818 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj @@ -1,6 +1,6 @@ - net5.0;netstandard2.0;net461 + $(NetCoreAppCurrent);net5.0;netstandard2.0;net461 false enable @@ -14,6 +14,9 @@ + + + diff --git a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.csproj b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.csproj index ae77b54b24fd6..ec5bbccaa11dc 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.csproj +++ b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0 @@ -8,6 +8,10 @@ + + + + diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj index cf546dca3587c..ddc9763b6315a 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj @@ -3,7 +3,7 @@ true $(DefineConstants);FLAVOR_WHIDBEY;PAPI_AD;PAPI_REGSAM;USE_CTX_CACHE true - $(NetCoreAppCurrent)-windows;netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0 $(NoWarn);CA2249 diff --git a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.csproj index f63b71f0a7c58..f7c8830a82032 100644 --- a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.csproj +++ b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0 @@ -8,6 +8,10 @@ + + + + diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj index 5a581ceb421c9..d3ee9bafa8edb 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj +++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj @@ -2,7 +2,7 @@ true true - $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-Linux;netcoreapp3.1-windows;netcoreapp3.1-OSX;netcoreapp3.1-Linux;netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1-OSX;netcoreapp3.1-Linux;netcoreapp3.1;netstandard2.0 diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs index 9ca1248ba6484..9d1eb9f1c5fae 100644 --- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs +++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs @@ -707,9 +707,9 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchem public int IndexOf(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaClass schemaClass) { throw null; } public void Insert(int index, System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaClass schemaClass) { } protected override void OnClearComplete() { } - protected override void OnInsertComplete(int index, object value) { } - protected override void OnRemoveComplete(int index, object value) { } - protected override void OnSetComplete(int index, object oldValue, object newValue) { } + protected override void OnInsertComplete(int index, object? value) { } + protected override void OnRemoveComplete(int index, object? value) { } + protected override void OnSetComplete(int index, object? oldValue, object? newValue) { } protected override void OnValidate(object value) { } public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaClass schemaClass) { } } @@ -754,9 +754,9 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchem public int IndexOf(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaProperty schemaProperty) { throw null; } public void Insert(int index, System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaProperty schemaProperty) { } protected override void OnClearComplete() { } - protected override void OnInsertComplete(int index, object value) { } - protected override void OnRemoveComplete(int index, object value) { } - protected override void OnSetComplete(int index, object oldValue, object newValue) { } + protected override void OnInsertComplete(int index, object? value) { } + protected override void OnRemoveComplete(int index, object? value) { } + protected override void OnSetComplete(int index, object? oldValue, object? newValue) { } protected override void OnValidate(object value) { } public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchemaProperty schemaProperty) { } } @@ -811,9 +811,9 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.ActiveDirectorySite[ public int IndexOf(System.DirectoryServices.ActiveDirectory.ActiveDirectorySite site) { throw null; } public void Insert(int index, System.DirectoryServices.ActiveDirectory.ActiveDirectorySite site) { } protected override void OnClearComplete() { } - protected override void OnInsertComplete(int index, object value) { } - protected override void OnRemoveComplete(int index, object value) { } - protected override void OnSetComplete(int index, object oldValue, object newValue) { } + protected override void OnInsertComplete(int index, object? value) { } + protected override void OnRemoveComplete(int index, object? value) { } + protected override void OnSetComplete(int index, object? oldValue, object? newValue) { } protected override void OnValidate(object value) { } public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySite site) { } } @@ -868,9 +868,9 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.ActiveDirectorySiteL public int IndexOf(System.DirectoryServices.ActiveDirectory.ActiveDirectorySiteLink link) { throw null; } public void Insert(int index, System.DirectoryServices.ActiveDirectory.ActiveDirectorySiteLink link) { } protected override void OnClearComplete() { } - protected override void OnInsertComplete(int index, object value) { } - protected override void OnRemoveComplete(int index, object value) { } - protected override void OnSetComplete(int index, object oldValue, object newValue) { } + protected override void OnInsertComplete(int index, object? value) { } + protected override void OnRemoveComplete(int index, object? value) { } + protected override void OnSetComplete(int index, object? oldValue, object? newValue) { } protected override void OnValidate(object value) { } public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySiteLink link) { } } @@ -918,9 +918,9 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.ActiveDirectorySubne public void Insert(int index, System.DirectoryServices.ActiveDirectory.ActiveDirectorySubnet subnet) { } protected override void OnClear() { } protected override void OnClearComplete() { } - protected override void OnInsertComplete(int index, object value) { } - protected override void OnRemoveComplete(int index, object value) { } - protected override void OnSetComplete(int index, object oldValue, object newValue) { } + protected override void OnInsertComplete(int index, object? value) { } + protected override void OnRemoveComplete(int index, object? value) { } + protected override void OnSetComplete(int index, object? oldValue, object? newValue) { } protected override void OnValidate(object value) { } public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySubnet subnet) { } } @@ -1138,9 +1138,9 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.DirectoryServer[] ar public void Insert(int index, System.DirectoryServices.ActiveDirectory.DirectoryServer server) { } protected override void OnClear() { } protected override void OnClearComplete() { } - protected override void OnInsertComplete(int index, object value) { } - protected override void OnRemoveComplete(int index, object value) { } - protected override void OnSetComplete(int index, object oldValue, object newValue) { } + protected override void OnInsertComplete(int index, object? value) { } + protected override void OnRemoveComplete(int index, object? value) { } + protected override void OnSetComplete(int index, object? oldValue, object? newValue) { } protected override void OnValidate(object value) { } public void Remove(System.DirectoryServices.ActiveDirectory.DirectoryServer server) { } } diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj index 05cc27bbd5e89..730a34adc19f4 100644 --- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj +++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0 true enable diff --git a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj index fded0bd60f048..cc86d1cb724d8 100644 --- a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj +++ b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj @@ -1,7 +1,7 @@ true - $(NetCoreAppCurrent)-windows;netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0 true enable diff --git a/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj b/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj index d425770d4144b..3ef2ef309ec11 100644 --- a/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj +++ b/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj @@ -2,7 +2,7 @@ true enable - net6.0;netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 true false diff --git a/src/libraries/System.Reflection.MetadataLoadContext/ref/System.Reflection.MetadataLoadContext.csproj b/src/libraries/System.Reflection.MetadataLoadContext/ref/System.Reflection.MetadataLoadContext.csproj index e13d016cba8ea..fe4145d630c00 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/ref/System.Reflection.MetadataLoadContext.csproj +++ b/src/libraries/System.Reflection.MetadataLoadContext/ref/System.Reflection.MetadataLoadContext.csproj @@ -1,11 +1,14 @@ - netcoreapp3.1;netstandard2.0;net461 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461 enable + + + diff --git a/src/libraries/System.Runtime.Caching/Directory.Build.props b/src/libraries/System.Runtime.Caching/Directory.Build.props index 826e3102fb1e6..11c85abc9db0e 100644 --- a/src/libraries/System.Runtime.Caching/Directory.Build.props +++ b/src/libraries/System.Runtime.Caching/Directory.Build.props @@ -6,6 +6,8 @@ to a different assembly. --> 4.0.0.0 Microsoft + true + browser Provides classes to use caching facilities. Commonly Used Types: diff --git a/src/libraries/System.Runtime.Caching/ref/System.Runtime.Caching.csproj b/src/libraries/System.Runtime.Caching/ref/System.Runtime.Caching.csproj index 2083b8217373e..2823f20016908 100644 --- a/src/libraries/System.Runtime.Caching/ref/System.Runtime.Caching.csproj +++ b/src/libraries/System.Runtime.Caching/ref/System.Runtime.Caching.csproj @@ -6,9 +6,8 @@ - - + diff --git a/src/libraries/System.Speech/ref/System.Speech.csproj b/src/libraries/System.Speech/ref/System.Speech.csproj index 9a8f2b437c242..47a37eb580cbf 100644 --- a/src/libraries/System.Speech/ref/System.Speech.csproj +++ b/src/libraries/System.Speech/ref/System.Speech.csproj @@ -1,10 +1,14 @@ - netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0 + + + + diff --git a/src/libraries/System.Speech/src/System.Speech.csproj b/src/libraries/System.Speech/src/System.Speech.csproj index 04079d1bf1b39..9a8fe628396d5 100644 --- a/src/libraries/System.Speech/src/System.Speech.csproj +++ b/src/libraries/System.Speech/src/System.Speech.csproj @@ -1,7 +1,7 @@  true - $(NetCoreAppCurrent)-windows;netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0 + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0 $(NoWarn);CS0649;SA1129 From 043951d69da2db50146ac7bc2158796f02b7349b Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 15 Jun 2021 14:50:34 +0200 Subject: [PATCH 2/2] PR feedback --- .../ref/Microsoft.Extensions.Primitives.csproj | 2 +- src/libraries/System.Runtime.Caching/Directory.Build.props | 1 - .../System.Runtime.Caching/src/System.Runtime.Caching.csproj | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj b/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj index 5a2a2ec763637..e6f45298de118 100644 --- a/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj +++ b/src/libraries/Microsoft.Extensions.Primitives/ref/Microsoft.Extensions.Primitives.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/libraries/System.Runtime.Caching/Directory.Build.props b/src/libraries/System.Runtime.Caching/Directory.Build.props index 11c85abc9db0e..749494404d83e 100644 --- a/src/libraries/System.Runtime.Caching/Directory.Build.props +++ b/src/libraries/System.Runtime.Caching/Directory.Build.props @@ -7,7 +7,6 @@ 4.0.0.0 Microsoft true - browser Provides classes to use caching facilities. Commonly Used Types: diff --git a/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj b/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj index f9977c0d0f544..e2a0ebdd80382 100644 --- a/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj +++ b/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj @@ -2,7 +2,6 @@ true $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1;netstandard2.0-windows;netstandard2.0 - true