diff --git a/Directory.Build.props b/Directory.Build.props index d1b03d7ef8de0..73a662740acc8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -44,6 +44,7 @@ .NETCoreApp $(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppCurrentVersion) net$(NetCoreAppCurrentVersion) + netcoreapp3.1 net$(AspNetCoreAppCurrentVersion) net$(NetCoreAppToolCurrentVersion) $(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion) diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj b/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj index 271f495a8dc21..0530b08235008 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj @@ -57,7 +57,7 @@ - + \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj b/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj index 3823f1cfac81d..61ab1f52eeaa7 100644 --- a/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj @@ -39,7 +39,7 @@ - + diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj b/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj index 25f981a38034e..7fbed60e9ee34 100644 --- a/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj +++ b/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj @@ -31,6 +31,6 @@ Microsoft.Extensions.Primitives.StringSegment - + diff --git a/src/libraries/Microsoft.Win32.Registry.AccessControl/pkg/Microsoft.Win32.Registry.AccessControl.pkgproj b/src/libraries/Microsoft.Win32.Registry.AccessControl/pkg/Microsoft.Win32.Registry.AccessControl.pkgproj index 95a5015b3ce32..6a5c8b77be00e 100644 --- a/src/libraries/Microsoft.Win32.Registry.AccessControl/pkg/Microsoft.Win32.Registry.AccessControl.pkgproj +++ b/src/libraries/Microsoft.Win32.Registry.AccessControl/pkg/Microsoft.Win32.Registry.AccessControl.pkgproj @@ -7,6 +7,7 @@ + \ No newline at end of file diff --git a/src/libraries/Microsoft.Win32.Registry.AccessControl/ref/Microsoft.Win32.Registry.AccessControl.csproj b/src/libraries/Microsoft.Win32.Registry.AccessControl/ref/Microsoft.Win32.Registry.AccessControl.csproj index c6e8d3fbf20a5..5f89098d52117 100644 --- a/src/libraries/Microsoft.Win32.Registry.AccessControl/ref/Microsoft.Win32.Registry.AccessControl.csproj +++ b/src/libraries/Microsoft.Win32.Registry.AccessControl/ref/Microsoft.Win32.Registry.AccessControl.csproj @@ -1,14 +1,23 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable + + + + + + + + + \ No newline at end of file diff --git a/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj b/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj index f66a53a084091..82538c4efbae4 100644 --- a/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj +++ b/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj @@ -1,17 +1,26 @@ true - netstandard2.0-windows;netstandard2.0;net461-windows + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netstandard2.0-windows;netstandard2.0;net461-windows enable + SR.PlatformNotSupported_RegistryAccessControl - true + true + + + + + + + + diff --git a/src/libraries/Microsoft.Win32.Registry.AccessControl/tests/Microsoft.Win32.Registry.AccessControl.Tests.csproj b/src/libraries/Microsoft.Win32.Registry.AccessControl/tests/Microsoft.Win32.Registry.AccessControl.Tests.csproj index 1752e89bc52e6..fb6e2d196998f 100644 --- a/src/libraries/Microsoft.Win32.Registry.AccessControl/tests/Microsoft.Win32.Registry.AccessControl.Tests.csproj +++ b/src/libraries/Microsoft.Win32.Registry.AccessControl/tests/Microsoft.Win32.Registry.AccessControl.Tests.csproj @@ -8,7 +8,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/Microsoft.Win32.SystemEvents/pkg/Microsoft.Win32.SystemEvents.pkgproj b/src/libraries/Microsoft.Win32.SystemEvents/pkg/Microsoft.Win32.SystemEvents.pkgproj index 5ef768cc0786e..6d9e4dc673cb0 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/pkg/Microsoft.Win32.SystemEvents.pkgproj +++ b/src/libraries/Microsoft.Win32.SystemEvents/pkg/Microsoft.Win32.SystemEvents.pkgproj @@ -5,7 +5,7 @@ uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks) - + \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.Composition.Registration/pkg/System.ComponentModel.Composition.Registration.pkgproj b/src/libraries/System.ComponentModel.Composition.Registration/pkg/System.ComponentModel.Composition.Registration.pkgproj index 2ef483eed7239..4c1d0b707154a 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/pkg/System.ComponentModel.Composition.Registration.pkgproj +++ b/src/libraries/System.ComponentModel.Composition.Registration/pkg/System.ComponentModel.Composition.Registration.pkgproj @@ -9,6 +9,7 @@ true + diff --git a/src/libraries/System.ComponentModel.Composition.Registration/ref/System.ComponentModel.Composition.Registration.csproj b/src/libraries/System.ComponentModel.Composition.Registration/ref/System.ComponentModel.Composition.Registration.csproj index d99d4ac486fba..c92f8b2348972 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/ref/System.ComponentModel.Composition.Registration.csproj +++ b/src/libraries/System.ComponentModel.Composition.Registration/ref/System.ComponentModel.Composition.Registration.csproj @@ -1,12 +1,14 @@ - netstandard2.1 + $(NetCoreAppCurrent);netstandard2.1 + + - - + + \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.Composition.Registration/src/System.ComponentModel.Composition.Registration.csproj b/src/libraries/System.ComponentModel.Composition.Registration/src/System.ComponentModel.Composition.Registration.csproj index cabd1dda2f242..1e12a946d7927 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/src/System.ComponentModel.Composition.Registration.csproj +++ b/src/libraries/System.ComponentModel.Composition.Registration/src/System.ComponentModel.Composition.Registration.csproj @@ -1,8 +1,9 @@ - netstandard2.1 + $(NetCoreAppCurrent);netstandard2.1 false + @@ -24,8 +25,17 @@ + + + + + + + + + diff --git a/src/libraries/System.ComponentModel.Composition.Registration/tests/System.ComponentModel.Composition.Registration.Tests.csproj b/src/libraries/System.ComponentModel.Composition.Registration/tests/System.ComponentModel.Composition.Registration.Tests.csproj index d079de0a2b670..df43866bc98e5 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/tests/System.ComponentModel.Composition.Registration.Tests.csproj +++ b/src/libraries/System.ComponentModel.Composition.Registration/tests/System.ComponentModel.Composition.Registration.Tests.csproj @@ -1,6 +1,7 @@ $(NetCoreAppCurrent) + disable diff --git a/src/libraries/System.ComponentModel.Composition/pkg/System.ComponentModel.Composition.pkgproj b/src/libraries/System.ComponentModel.Composition/pkg/System.ComponentModel.Composition.pkgproj index edf42f9de2e78..49ae7cf0595ee 100644 --- a/src/libraries/System.ComponentModel.Composition/pkg/System.ComponentModel.Composition.pkgproj +++ b/src/libraries/System.ComponentModel.Composition/pkg/System.ComponentModel.Composition.pkgproj @@ -10,7 +10,7 @@ - + diff --git a/src/libraries/System.Composition.AttributedModel/pkg/System.Composition.AttributedModel.pkgproj b/src/libraries/System.Composition.AttributedModel/pkg/System.Composition.AttributedModel.pkgproj index 340da4ff11737..4c2c1ff8a36a9 100644 --- a/src/libraries/System.Composition.AttributedModel/pkg/System.Composition.AttributedModel.pkgproj +++ b/src/libraries/System.Composition.AttributedModel/pkg/System.Composition.AttributedModel.pkgproj @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj b/src/libraries/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj index 999ec09ad8fc2..7d49a3802f966 100644 --- a/src/libraries/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj +++ b/src/libraries/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj @@ -1,7 +1,8 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 + @@ -17,4 +18,8 @@ + + + + \ No newline at end of file diff --git a/src/libraries/System.Composition.Convention/pkg/System.Composition.Convention.pkgproj b/src/libraries/System.Composition.Convention/pkg/System.Composition.Convention.pkgproj index 8239d4a17e689..957c0d82866a0 100644 --- a/src/libraries/System.Composition.Convention/pkg/System.Composition.Convention.pkgproj +++ b/src/libraries/System.Composition.Convention/pkg/System.Composition.Convention.pkgproj @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Composition.Convention/src/System.Composition.Convention.csproj b/src/libraries/System.Composition.Convention/src/System.Composition.Convention.csproj index 948a3a7934dc6..500ab5bb2a271 100644 --- a/src/libraries/System.Composition.Convention/src/System.Composition.Convention.csproj +++ b/src/libraries/System.Composition.Convention/src/System.Composition.Convention.csproj @@ -1,8 +1,9 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 false + @@ -21,7 +22,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Composition.Hosting/pkg/System.Composition.Hosting.pkgproj b/src/libraries/System.Composition.Hosting/pkg/System.Composition.Hosting.pkgproj index dcc53d4d65c80..d319cbd0c8e27 100644 --- a/src/libraries/System.Composition.Hosting/pkg/System.Composition.Hosting.pkgproj +++ b/src/libraries/System.Composition.Hosting/pkg/System.Composition.Hosting.pkgproj @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Composition.Hosting/src/System.Composition.Hosting.csproj b/src/libraries/System.Composition.Hosting/src/System.Composition.Hosting.csproj index 66c1f0e8fe198..437ad767826ff 100644 --- a/src/libraries/System.Composition.Hosting/src/System.Composition.Hosting.csproj +++ b/src/libraries/System.Composition.Hosting/src/System.Composition.Hosting.csproj @@ -1,8 +1,9 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 false + @@ -31,10 +32,21 @@ + - + + + + + + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Composition.Runtime/pkg/System.Composition.Runtime.pkgproj b/src/libraries/System.Composition.Runtime/pkg/System.Composition.Runtime.pkgproj index c72e14fe909f7..acdef61a398d0 100644 --- a/src/libraries/System.Composition.Runtime/pkg/System.Composition.Runtime.pkgproj +++ b/src/libraries/System.Composition.Runtime/pkg/System.Composition.Runtime.pkgproj @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Composition.Runtime/src/System.Composition.Runtime.csproj b/src/libraries/System.Composition.Runtime/src/System.Composition.Runtime.csproj index cdd6654321fe4..b5ecf044a581a 100644 --- a/src/libraries/System.Composition.Runtime/src/System.Composition.Runtime.csproj +++ b/src/libraries/System.Composition.Runtime/src/System.Composition.Runtime.csproj @@ -1,8 +1,9 @@ System.Composition - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 + @@ -12,4 +13,10 @@ + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Composition.TypedParts/pkg/System.Composition.TypedParts.pkgproj b/src/libraries/System.Composition.TypedParts/pkg/System.Composition.TypedParts.pkgproj index e884c4bc186fb..e7ea55ed613c0 100644 --- a/src/libraries/System.Composition.TypedParts/pkg/System.Composition.TypedParts.pkgproj +++ b/src/libraries/System.Composition.TypedParts/pkg/System.Composition.TypedParts.pkgproj @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Composition.TypedParts/src/System.Composition.TypedParts.csproj b/src/libraries/System.Composition.TypedParts/src/System.Composition.TypedParts.csproj index d22e4354ffee4..c8828d012e679 100644 --- a/src/libraries/System.Composition.TypedParts/src/System.Composition.TypedParts.csproj +++ b/src/libraries/System.Composition.TypedParts/src/System.Composition.TypedParts.csproj @@ -1,9 +1,10 @@ System.Composition - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 false + @@ -29,9 +30,17 @@ + + + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj b/src/libraries/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj index 3d67703c71c61..1bf618240bac7 100644 --- a/src/libraries/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj +++ b/src/libraries/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj @@ -5,7 +5,7 @@ uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks) - + diff --git a/src/libraries/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj b/src/libraries/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj index 363d30827ca3e..1f5f6789ca9e0 100644 --- a/src/libraries/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj +++ b/src/libraries/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj @@ -5,6 +5,7 @@ net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + \ No newline at end of file diff --git a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs index 9011a9f247d13..a29a00d7a6af5 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -179,7 +179,7 @@ public event System.Data.OleDb.OleDbRowUpdatingEventHandler? RowUpdating { add { public int Fill(System.Data.DataTable dataTable, object ADODBRecordSet) { throw null; } protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) { } protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) { } - object? System.ICloneable.Clone() { throw null; } + object System.ICloneable.Clone() { throw null; } } public sealed partial class OleDbDataReader : System.Data.Common.DbDataReader { @@ -363,7 +363,7 @@ public OleDbParameter(string? name, object? value) { } public override object? Value { get { throw null; } set { } } public override void ResetDbType() { } public void ResetOleDbType() { } - object? System.ICloneable.Clone() { throw null; } + object System.ICloneable.Clone() { throw null; } public override string ToString() { throw null; } } [System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.Data.Design.DBParametersEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] diff --git a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.csproj b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.csproj index b7a09b249da42..a08c83b5cc146 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.csproj +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.csproj @@ -1,20 +1,24 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 $(NoWarn);0618 enable + + - - + + + + @@ -22,5 +26,6 @@ + \ No newline at end of file diff --git a/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs b/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs index a9aa7d1d56b33..9c6fb06c90101 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs @@ -117,7 +117,7 @@ public event OleDbRowUpdatingEventHandler? RowUpdating // prevent someone from registering two different command builders on the adapter by // silently removing the old one - if ((null != handler) && (value.Target is DbCommandBuilder)) + if ((null != handler) && (value!.Target is DbCommandBuilder)) { OleDbRowUpdatingEventHandler? d = (OleDbRowUpdatingEventHandler?)ADP.FindBuilder(handler); if (null != d) diff --git a/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs b/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs index f3b6a0e011710..e50ba5a23b1d0 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs @@ -968,7 +968,7 @@ private OleDbDataReader GetDataForReader(IntPtr ordinal, RowBinding rowbinding, OleDbDataReader? reader = null; - if (null != result) + if (result != null) { // only when the first datareader is closed will the connection close ChapterHandle chapterHandle = ChapterHandle.CreateChapterHandle(result, rowbinding, valueOffset); @@ -977,7 +977,7 @@ private OleDbDataReader GetDataForReader(IntPtr ordinal, RowBinding rowbinding, reader.BuildMetaInfo(); reader.HasRowsRead(); - if (null != _connection) + if (_connection != null) { // connection tracks all readers to prevent cmd from executing // until all readers (including nested) are closed @@ -985,7 +985,7 @@ private OleDbDataReader GetDataForReader(IntPtr ordinal, RowBinding rowbinding, } } - return reader; + return reader!; } public override string GetDataTypeName(int index) @@ -1730,7 +1730,6 @@ private void GetRowHandles(/*int skipCount*/) RowHandleBuffer rowHandleBuffer = _rowHandleNativeBuffer!; bool mustRelease = false; - RuntimeHelpers.PrepareConstrainedRegions(); try { @@ -1881,7 +1880,6 @@ private void GetRowValue() bool mustReleaseBinding = false; bool[] mustRelease = new bool[columnBindings.Length]; StringMemHandle?[] sptr = new StringMemHandle[columnBindings.Length]; - RuntimeHelpers.PrepareConstrainedRegions(); try { diff --git a/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs b/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs index e978419c2f836..d2620c38b1c53 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs @@ -214,13 +214,13 @@ private DataTable GetDataSourceInformationTable(OleDbConnection connection, OleD StringBuilder compositeSeparatorPattern = new StringBuilder(); StringBuilder patternEscaped = new StringBuilder(); ADP.EscapeSpecialCharacters(catalogSeparatorPattern, patternEscaped); - compositeSeparatorPattern.Append(patternEscaped.ToString()); + compositeSeparatorPattern.Append(patternEscaped); if ((schemaSeparatorPattern != null) && (schemaSeparatorPattern != catalogSeparatorPattern)) { compositeSeparatorPattern.Append('|'); patternEscaped.Length = 0; ADP.EscapeSpecialCharacters(schemaSeparatorPattern, patternEscaped); - compositeSeparatorPattern.Append(patternEscaped.ToString()); + compositeSeparatorPattern.Append(patternEscaped); } dataSourceInformation[DbMetaDataColumnNames.CompositeIdentifierSeparatorPattern] = compositeSeparatorPattern.ToString(); } diff --git a/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs b/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs index 26a20357af16b..2181a6cbe75af 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs @@ -181,7 +181,7 @@ public OleDbTransaction Begin(IsolationLevel isolevel) } else if ((null != _nestedTransaction) && _nestedTransaction.IsAlive) { - throw ADP.ParallelTransactionsNotSupported(Connection); + throw ADP.ParallelTransactionsNotSupported(Connection!); } // either the connection will be open or this will be a zombie diff --git a/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj b/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj index 4140b529697a1..27ffeb6ecd338 100644 --- a/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj +++ b/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj @@ -1,16 +1,24 @@ true - netstandard2.0-windows;netstandard2.0;net461-windows + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netstandard2.0-windows;netstandard2.0;net461-windows true enable + + $(NoWarn);CA2249 + + $(NoWarn);SYSLIB0004 + + $(NoWarn);CA1845 + true SR.PlatformNotSupported_OleDb - $(NoWarn);CS0618 + $(NoWarn);CS0618 + @@ -91,11 +99,43 @@ + - - System.Data.OleDb.OleDbMetaData.xml - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -103,7 +143,5 @@ - - diff --git a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs index 68892d670c3c1..f9a4d529da0f4 100644 --- a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs @@ -130,10 +130,6 @@ private DataTable ExecuteCommand(DataRow requestedCollectionRow, string?[]? rest DataColumn collectionNameColumn = metaDataCollectionsTable.Columns[_collectionName]!; //DataColumn restrictionNameColumn = metaDataCollectionsTable.Columns[_restrictionName]; - DataTable? resultTable = null; - DbCommand? command = null; - DataTable? schemaTable = null; - Debug.Assert(requestedCollectionRow != null); string sqlCommand = (requestedCollectionRow[populationStringColumn, DataRowVersion.Current] as string)!; int numberOfRestrictions = (int)requestedCollectionRow[numberOfRestrictionsColumn, DataRowVersion.Current]; @@ -144,10 +140,11 @@ private DataTable ExecuteCommand(DataRow requestedCollectionRow, string?[]? rest throw ADP.TooManyRestrictions(collectionName); } - command = connection.CreateCommand(); + DbCommand? command = connection.CreateCommand(); command.CommandText = sqlCommand; command.CommandTimeout = System.Math.Max(command.CommandTimeout, 180); + DataTable? resultTable = null; for (int i = 0; i < numberOfRestrictions; i++) { DbParameter restrictionParameter = command.CreateParameter(); @@ -190,8 +187,8 @@ private DataTable ExecuteCommand(DataRow requestedCollectionRow, string?[]? rest resultTable = new DataTable(collectionName); resultTable.Locale = CultureInfo.InvariantCulture; - schemaTable = reader.GetSchemaTable(); - foreach (DataRow row in schemaTable.Rows) + DataTable? schemaTable = reader.GetSchemaTable(); + foreach (DataRow row in schemaTable!.Rows) { resultTable.Columns.Add(row["ColumnName"] as string, (Type)row["DataType"]); } @@ -210,6 +207,7 @@ private DataTable ExecuteCommand(DataRow requestedCollectionRow, string?[]? rest reader = null; } } + return resultTable; } diff --git a/src/libraries/System.Diagnostics.EventLog/pkg/System.Diagnostics.EventLog.pkgproj b/src/libraries/System.Diagnostics.EventLog/pkg/System.Diagnostics.EventLog.pkgproj index 9e45e669acb98..5c01f83bb6604 100644 --- a/src/libraries/System.Diagnostics.EventLog/pkg/System.Diagnostics.EventLog.pkgproj +++ b/src/libraries/System.Diagnostics.EventLog/pkg/System.Diagnostics.EventLog.pkgproj @@ -5,7 +5,7 @@ uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks) - + \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj index 14a4d33561620..5b55f612f8d33 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj +++ b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj @@ -126,6 +126,7 @@ + diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/pkg/System.Diagnostics.PerformanceCounter.pkgproj b/src/libraries/System.Diagnostics.PerformanceCounter/pkg/System.Diagnostics.PerformanceCounter.pkgproj index 9b942dbe58e76..2fef4179be2b7 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/pkg/System.Diagnostics.PerformanceCounter.pkgproj +++ b/src/libraries/System.Diagnostics.PerformanceCounter/pkg/System.Diagnostics.PerformanceCounter.pkgproj @@ -6,7 +6,7 @@ - + diff --git a/src/libraries/System.DirectoryServices.AccountManagement/pkg/System.DirectoryServices.AccountManagement.pkgproj b/src/libraries/System.DirectoryServices.AccountManagement/pkg/System.DirectoryServices.AccountManagement.pkgproj index 86e4fd6273bc7..928e56d05b1d9 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/pkg/System.DirectoryServices.AccountManagement.pkgproj +++ b/src/libraries/System.DirectoryServices.AccountManagement/pkg/System.DirectoryServices.AccountManagement.pkgproj @@ -11,7 +11,7 @@ runtimes/win/lib/net461 - + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices.Protocols/pkg/System.DirectoryServices.Protocols.pkgproj b/src/libraries/System.DirectoryServices.Protocols/pkg/System.DirectoryServices.Protocols.pkgproj index 274c781251d29..470c1346abaa0 100644 --- a/src/libraries/System.DirectoryServices.Protocols/pkg/System.DirectoryServices.Protocols.pkgproj +++ b/src/libraries/System.DirectoryServices.Protocols/pkg/System.DirectoryServices.Protocols.pkgproj @@ -12,7 +12,7 @@ runtimes/win/lib/net461 - + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices/pkg/System.DirectoryServices.pkgproj b/src/libraries/System.DirectoryServices/pkg/System.DirectoryServices.pkgproj index 6b392134854b8..c115ab6fa0896 100644 --- a/src/libraries/System.DirectoryServices/pkg/System.DirectoryServices.pkgproj +++ b/src/libraries/System.DirectoryServices/pkg/System.DirectoryServices.pkgproj @@ -13,7 +13,7 @@ runtimes/win/lib/net461 - + \ No newline at end of file diff --git a/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj b/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj index d478641dc5eed..16e0cc61ee482 100644 --- a/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj +++ b/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj @@ -6,7 +6,7 @@ - + diff --git a/src/libraries/System.IO.Packaging/pkg/System.IO.Packaging.pkgproj b/src/libraries/System.IO.Packaging/pkg/System.IO.Packaging.pkgproj index 6335a71313f60..14c8ca9ff74c9 100644 --- a/src/libraries/System.IO.Packaging/pkg/System.IO.Packaging.pkgproj +++ b/src/libraries/System.IO.Packaging/pkg/System.IO.Packaging.pkgproj @@ -8,6 +8,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj index 3d0cb8b6ff79f..c2ea960539aeb 100644 --- a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj +++ b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj @@ -1,13 +1,19 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable - + + + + + + + diff --git a/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj b/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj index 1f52d164d2d93..abb185806210a 100644 --- a/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj +++ b/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj @@ -1,13 +1,17 @@ true - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable + + $(NoWarn);CA1847 + true + @@ -38,6 +42,14 @@ + + + + + + + + diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs index 32f9739714151..f87baba3e95df 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs @@ -33,7 +33,7 @@ internal static void PerformInitialReadAndVerifyEncoding(XmlReader reader) //If the first node is XmlDeclaration we check to see if the encoding attribute is present if (reader.Read() && reader.NodeType == XmlNodeType.XmlDeclaration && reader.Depth == 0) { - string encoding = reader.GetAttribute(EncodingAttribute); + string? encoding = reader.GetAttribute(EncodingAttribute); if (!string.IsNullOrEmpty(encoding)) { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs index f4ed524180ef1..20885d57997e3 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs @@ -600,7 +600,7 @@ private void ParseCorePropertyPart(PackagePart part) internal static void ValidateXsiType(XmlReader reader, object ns, string name) { // Get the value of xsi;type - string typeValue = reader.GetAttribute(PackageXmlStringTable.GetXmlString(PackageXmlEnum.Type), + string? typeValue = reader.GetAttribute(PackageXmlStringTable.GetXmlString(PackageXmlEnum.Type), PackageXmlStringTable.GetXmlString(PackageXmlEnum.XmlSchemaInstanceNamespace)); // Missing xsi:type diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs index d24b354558bb0..df65e29fdf149 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs @@ -405,11 +405,11 @@ public override string GetAttribute(int i) /// /// The value of the specified attribute. If the attribute is not found, a null reference is returned. /// - public override string? GetAttribute(string localName, string namespaceURI) + public override string? GetAttribute(string localName, string? namespaceURI) { string? result = null; - if (_ignoredAttributeCount == 0 || !ShouldIgnoreNamespace(namespaceURI)) + if (_ignoredAttributeCount == 0 || !ShouldIgnoreNamespace(namespaceURI!)) { // if the current element does not have any attributes that should be ignored or // the namespace provided is not ignorable, call Reader method @@ -503,7 +503,7 @@ public override bool MoveToAttribute(string name) /// /// true if the attribute is found; otherwise, false. If false, the reader's position does not change. /// - public override bool MoveToAttribute(string localName, string namespaceURI) + public override bool MoveToAttribute(string localName, string? namespaceURI) { bool result; @@ -518,7 +518,7 @@ public override bool MoveToAttribute(string localName, string namespaceURI) result = Reader.MoveToAttribute(localName, namespaceURI); - if (result && ShouldIgnoreNamespace(namespaceURI)) + if (result && ShouldIgnoreNamespace(namespaceURI!)) { result = false; RestoreReaderPosition(); @@ -594,7 +594,7 @@ public override bool MoveToNextAttribute() /// public override string? LookupNamespace(string prefix) { - string namespaceName = Reader.LookupNamespace(prefix); + string? namespaceName = Reader.LookupNamespace(prefix); if (namespaceName != null) { @@ -613,6 +613,7 @@ public override bool MoveToNextAttribute() /// for the xmlns attribute reflects all the /// compatibility (subsuming) rules. /// +#pragma warning disable CS8764 // Nullability of return type doesn't match overridden member public override string? Value { get @@ -631,6 +632,7 @@ public override string? Value return Reader.Value; } } +#pragma warning restore CS8764 /// /// Gets the namespace URI (as defined in the W3C Namespace specification) of the node @@ -693,7 +695,7 @@ private void RestoreReaderPosition() // Restore reader state from SaveReaderPosition if (_inAttribute) { - Reader.MoveToAttribute(_currentName); + Reader.MoveToAttribute(_currentName!); } else { @@ -1141,7 +1143,7 @@ private void HandleChoice(int elementDepth, ref bool more) Error(SR.XCRChoiceAfterFallback); } - string requiresValue = Reader.GetAttribute(Requires); + string? requiresValue = Reader.GetAttribute(Requires); if (requiresValue == null) { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs index f94c528ebc4dd..370b566b5b0a6 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs @@ -22,14 +22,14 @@ internal XmlWrappingReader(XmlReader baseReader) Reader = baseReader; } - public override XmlReaderSettings Settings { get { return _reader.Settings; } } + public override XmlReaderSettings? Settings { get { return _reader.Settings; } } public override XmlNodeType NodeType { get { return _reader.NodeType; } } public override string Name { get { return _reader.Name; } } public override string LocalName { get { return _reader.LocalName; } } public override string NamespaceURI { get { return _reader.NamespaceURI; } } public override string Prefix { get { return _reader.Prefix; } } public override bool HasValue { get { return _reader.HasValue; } } - public override string? Value { get { return _reader.Value; } } + public override string Value { get { return _reader.Value; } } public override int Depth { get { return _reader.Depth; } } public override string BaseURI { get { return _reader.BaseURI; } } public override bool IsEmptyElement { get { return _reader.IsEmptyElement; } } @@ -39,8 +39,8 @@ internal XmlWrappingReader(XmlReader baseReader) public override System.Type ValueType { get { return _reader.ValueType; } } public override int AttributeCount { get { return _reader.AttributeCount; } } public override string this[int i] { get { return _reader[i]; } } - public override string this[string name] { get { return _reader[name]; } } - public override string this[string name, string namespaceURI] { get { return _reader[name, namespaceURI]; } } + public override string? this[string name] { get { return _reader[name]; } } + public override string? this[string name, string? namespaceURI] { get { return _reader[name, namespaceURI]; } } public override bool CanResolveEntity { get { return _reader.CanResolveEntity; } } public override bool EOF { get { return _reader.EOF; } } public override ReadState ReadState { get { return _reader.ReadState; } } @@ -52,7 +52,7 @@ internal XmlWrappingReader(XmlReader baseReader) return _reader.GetAttribute(name); } - public override string? GetAttribute(string name, string namespaceURI) + public override string? GetAttribute(string name, string? namespaceURI) { return _reader.GetAttribute(name, namespaceURI); } @@ -67,7 +67,7 @@ public override bool MoveToAttribute(string name) return _reader.MoveToAttribute(name); } - public override bool MoveToAttribute(string name, string ns) + public override bool MoveToAttribute(string name, string? ns) { return _reader.MoveToAttribute(name, ns); } @@ -109,12 +109,12 @@ public override void Skip() string? IXmlNamespaceResolver.LookupPrefix(string namespaceName) { - return (_readerAsResolver == null) ? null : _readerAsResolver.LookupPrefix(namespaceName); + return _readerAsResolver?.LookupPrefix(namespaceName); } - IDictionary? IXmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope scope) + IDictionary IXmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope scope) { - return (_readerAsResolver == null) ? null : _readerAsResolver.GetNamespacesInScope(scope); + return _readerAsResolver?.GetNamespacesInScope(scope)!; } public override void ResolveEntity() diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs index fb4f41723ded8..8f4fd15ddfc5a 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs @@ -851,17 +851,17 @@ private void ProcessDefaultTagAttributes(XmlReader reader) // get the required Extension and ContentType attributes - string extensionAttributeValue = reader.GetAttribute(ExtensionAttributeName); + string? extensionAttributeValue = reader.GetAttribute(ExtensionAttributeName); ValidateXmlAttribute(ExtensionAttributeName, extensionAttributeValue, DefaultTagName, reader); - string contentTypeAttributeValue = reader.GetAttribute(ContentTypeAttributeName); + string? contentTypeAttributeValue = reader.GetAttribute(ContentTypeAttributeName); ThrowIfXmlAttributeMissing(ContentTypeAttributeName, contentTypeAttributeValue, DefaultTagName, reader); // The extensions are stored in the Default Dictionary in their original form , but they are compared // in a normalized manner using the ExtensionComparer. PackUriHelper.ValidatedPartUri temporaryUri = PackUriHelper.ValidatePartUri( new Uri(TemporaryPartNameWithoutExtension + extensionAttributeValue, UriKind.Relative)); - _defaultDictionary.Add(temporaryUri.PartUriExtension, new ContentType(contentTypeAttributeValue)); + _defaultDictionary.Add(temporaryUri.PartUriExtension, new ContentType(contentTypeAttributeValue!)); //Skip the EndElement for Default Tag if (!reader.IsEmptyElement) @@ -878,20 +878,20 @@ private void ProcessOverrideTagAttributes(XmlReader reader) // get the required Extension and ContentType attributes - string partNameAttributeValue = reader.GetAttribute(PartNameAttributeName); + string? partNameAttributeValue = reader.GetAttribute(PartNameAttributeName); ValidateXmlAttribute(PartNameAttributeName, partNameAttributeValue, OverrideTagName, reader); - string contentTypeAttributeValue = reader.GetAttribute(ContentTypeAttributeName); + string? contentTypeAttributeValue = reader.GetAttribute(ContentTypeAttributeName); ThrowIfXmlAttributeMissing(ContentTypeAttributeName, contentTypeAttributeValue, OverrideTagName, reader); - PackUriHelper.ValidatedPartUri partUri = PackUriHelper.ValidatePartUri(new Uri(partNameAttributeValue, UriKind.Relative)); + PackUriHelper.ValidatedPartUri partUri = PackUriHelper.ValidatePartUri(new Uri(partNameAttributeValue!, UriKind.Relative)); //Lazy initializing - ensure that the override dictionary has been initialized EnsureOverrideDictionary(); // The part Uris are stored in the Override Dictionary in their original form , but they are compared // in a normalized manner using PartUriComparer. - _overrideDictionary.Add(partUri, new ContentType(contentTypeAttributeValue)); + _overrideDictionary.Add(partUri, new ContentType(contentTypeAttributeValue!)); //Skip the EndElement for Override Tag if (!reader.IsEmptyElement) @@ -957,19 +957,19 @@ private void WriteDefaultElement(XmlWriter xmlWriter, string extension, ContentT } //Validate if the required XML attribute is present and not an empty string - private void ValidateXmlAttribute(string attributeName, string attributeValue, string tagName, XmlReader reader) + private void ValidateXmlAttribute(string attributeName, string? attributeValue, string tagName, XmlReader reader) { ThrowIfXmlAttributeMissing(attributeName, attributeValue, tagName, reader); //Checking for empty attribute - if (attributeValue.Length == 0) + if (attributeValue!.Length == 0) throw new XmlException(SR.Format(SR.RequiredAttributeEmpty, tagName, attributeName), null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition); } //Validate if the required Content type XML attribute is present //Content type of a part can be empty - private void ThrowIfXmlAttributeMissing(string attributeName, string attributeValue, string tagName, XmlReader reader) + private void ThrowIfXmlAttributeMissing(string attributeName, string? attributeValue, string tagName, XmlReader reader) { if (attributeValue == null) throw new XmlException(SR.Format(SR.RequiredAttributeMissing, tagName, attributeName), null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition); diff --git a/src/libraries/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj b/src/libraries/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj index ef519b99b1a6d..a3dc8c7813961 100644 --- a/src/libraries/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj +++ b/src/libraries/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj @@ -19,7 +19,7 @@ - + diff --git a/src/libraries/System.IO.Ports/pkg/System.IO.Ports.pkgproj b/src/libraries/System.IO.Ports/pkg/System.IO.Ports.pkgproj index 1344260b32760..d100db7d9a7e4 100644 --- a/src/libraries/System.IO.Ports/pkg/System.IO.Ports.pkgproj +++ b/src/libraries/System.IO.Ports/pkg/System.IO.Ports.pkgproj @@ -5,6 +5,7 @@ net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + diff --git a/src/libraries/System.IO.Ports/ref/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/ref/System.IO.Ports.csproj index 85b352191c9c8..c6278c5404322 100644 --- a/src/libraries/System.IO.Ports/ref/System.IO.Ports.csproj +++ b/src/libraries/System.IO.Ports/ref/System.IO.Ports.csproj @@ -1,9 +1,14 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 + + + + + \ No newline at end of file diff --git a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj index 878c5e2a3f988..c3691c1b93381 100644 --- a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj +++ b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj @@ -1,17 +1,18 @@ true - $(DefineConstants);NOSPAN;SERIAL_PORTS + $(DefineConstants);SERIAL_PORTS true annotations - netstandard2.0-windows;netstandard2.0-Linux;netstandard2.0-OSX;netstandard2.0-FreeBSD;netstandard2.0;net461-windows + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);netstandard2.0-windows;netstandard2.0-Unix;netstandard2.0;net461-windows + true SR.PlatformNotSupported_IOPorts - true + @@ -29,6 +30,7 @@ + - - - - - - - - - - + + + @@ -133,6 +128,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.FreeBSD.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.FreeBSD.cs deleted file mode 100644 index 10ddfa521d5a9..0000000000000 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.FreeBSD.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.ComponentModel; -using System.Collections.Generic; -using System.IO; - -namespace System.IO.Ports -{ - public partial class SerialPort : Component - { - public static string[] GetPortNames() - { - List ports = new List(); - - foreach (string name in Directory.GetFiles("/dev", "ttyd*")) - { - if (!name.EndsWith(".init", StringComparison.Ordinal) && !name.EndsWith(".lock", StringComparison.Ordinal)) - { - ports.Add(name); - } - } - - foreach (string name in Directory.GetFiles("/dev", "cuau*")) - { - if (!name.EndsWith(".init", StringComparison.Ordinal) && !name.EndsWith(".lock", StringComparison.Ordinal)) - { - ports.Add(name); - } - } - - return ports.ToArray(); - } - } -} diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.OSX.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.OSX.cs deleted file mode 100644 index c3077c339bf6f..0000000000000 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.OSX.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.ComponentModel; -using System.Collections.Generic; -using System.IO; - -namespace System.IO.Ports -{ - public partial class SerialPort : Component - { - public static string[] GetPortNames() - { - List ports = new List(); - - foreach (string name in Directory.GetFiles("/dev", "tty.*")) - { - // GetFiles can return unexpected results because of 8.3 matching. - // Like /dev/tty - if (name.StartsWith("/dev/tty.", StringComparison.Ordinal)) - { - ports.Add(name); - } - } - - foreach (string name in Directory.GetFiles("/dev", "cu.*")) - { - if (name.StartsWith("/dev/cu.", StringComparison.Ordinal)) - { - ports.Add(name); - } - } - - return ports.ToArray(); - } - } -} diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Linux.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs similarity index 60% rename from src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Linux.cs rename to src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs index f922ad091b1d8..79cc4a791f7ae 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Linux.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs @@ -5,6 +5,7 @@ using System.ComponentModel; using System.Collections.Generic; using System.IO; +using System.Runtime.InteropServices; namespace System.IO.Ports { @@ -12,6 +13,20 @@ public partial class SerialPort : Component { public static string[] GetPortNames() { +#if NETCOREAPP + return OperatingSystem.IsLinux() ? GetPortNames_Linux() + : OperatingSystem.IsMacOS() ? GetPortNames_OSX() + : OperatingSystem.IsFreeBSD() ? GetPortNames_FreeBSD() +#else + return RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? GetPortNames_Linux() + : RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? GetPortNames_OSX() + : RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")) ? GetPortNames_FreeBSD() +#endif + : throw new PlatformNotSupportedException(SR.PlatformNotSupported_SerialPort_GetPortNames); + } + + private static string[] GetPortNames_Linux() + { const string sysTtyDir = "/sys/class/tty"; const string sysUsbDir = "/sys/bus/usb-serial/devices/"; const string devDir = "/dev/"; @@ -70,5 +85,53 @@ public static string[] GetPortNames() return ports.ToArray(); } } + + private static string[] GetPortNames_OSX() + { + List ports = new List(); + + foreach (string name in Directory.GetFiles("/dev", "tty.*")) + { + // GetFiles can return unexpected results because of 8.3 matching. + // Like /dev/tty + if (name.StartsWith("/dev/tty.", StringComparison.Ordinal)) + { + ports.Add(name); + } + } + + foreach (string name in Directory.GetFiles("/dev", "cu.*")) + { + if (name.StartsWith("/dev/cu.", StringComparison.Ordinal)) + { + ports.Add(name); + } + } + + return ports.ToArray(); + } + + private static string[] GetPortNames_FreeBSD() + { + List ports = new List(); + + foreach (string name in Directory.GetFiles("/dev", "ttyd*")) + { + if (!name.EndsWith(".init", StringComparison.Ordinal) && !name.EndsWith(".lock", StringComparison.Ordinal)) + { + ports.Add(name); + } + } + + foreach (string name in Directory.GetFiles("/dev", "cuau*")) + { + if (!name.EndsWith(".init", StringComparison.Ordinal) && !name.EndsWith(".lock", StringComparison.Ordinal)) + { + ports.Add(name); + } + } + + return ports.ToArray(); + } } } diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs index ac930c78a1a1d..22d6a92cd4bac 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs @@ -19,10 +19,6 @@ public static string[] GetPortNames() // // QueryDosDevice involves finding any ports that map to \Device\Serialx (call with null to get all, then iterate to get the actual device name) -#if NETSTANDARD - Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); -#endif - using (RegistryKey serialKey = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DEVICEMAP\SERIALCOMM")) { if (serialKey != null) diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs index cec491596eff3..6a8505c7ba1ae 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs @@ -10,7 +10,12 @@ namespace System.IO.Ports { +// Issue https://github.com/dotnet/runtime/issues/54916 +// 'SerialStream' overrides array-based 'ReadAsync' but does not override memory-based 'ReadAsync'. Consider overriding memory-based 'ReadAsync' to improve performance. +// 'SerialStream' overrides array-based 'WriteAsync' but does not override memory-based 'WriteAsync'. Consider overriding memory-based 'WriteAsync' to improve performance. +#pragma warning disable CA1844 internal sealed partial class SerialStream : Stream +#pragma warning restore CA1844 { private const int MaxDataBits = 8; private const int MinDataBits = 5; diff --git a/src/libraries/System.Management/pkg/System.Management.pkgproj b/src/libraries/System.Management/pkg/System.Management.pkgproj index fa36b7b68fbc8..55cde1bab5c91 100644 --- a/src/libraries/System.Management/pkg/System.Management.pkgproj +++ b/src/libraries/System.Management/pkg/System.Management.pkgproj @@ -11,7 +11,7 @@ runtimes/win/lib/net461 - + \ No newline at end of file diff --git a/src/libraries/System.Memory.Data/pkg/System.Memory.Data.pkgproj b/src/libraries/System.Memory.Data/pkg/System.Memory.Data.pkgproj index f7170bd421917..4427a3e822abf 100644 --- a/src/libraries/System.Memory.Data/pkg/System.Memory.Data.pkgproj +++ b/src/libraries/System.Memory.Data/pkg/System.Memory.Data.pkgproj @@ -4,6 +4,7 @@ net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + \ No newline at end of file diff --git a/src/libraries/System.Memory.Data/ref/System.Memory.Data.cs b/src/libraries/System.Memory.Data/ref/System.Memory.Data.cs index d2bb7a7622d1d..302a4da145f0f 100644 --- a/src/libraries/System.Memory.Data/ref/System.Memory.Data.cs +++ b/src/libraries/System.Memory.Data/ref/System.Memory.Data.cs @@ -27,7 +27,7 @@ public BinaryData(string data) { } public static implicit operator System.ReadOnlySpan (System.BinaryData? data) { throw null; } public byte[] ToArray() { throw null; } public System.ReadOnlyMemory ToMemory() { throw null; } - public T ToObjectFromJson(System.Text.Json.JsonSerializerOptions? options = null) { throw null; } + public T? ToObjectFromJson(System.Text.Json.JsonSerializerOptions? options = null) { throw null; } public System.IO.Stream ToStream() { throw null; } public override string ToString() { throw null; } } diff --git a/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj b/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj index c5537ac47ec0e..30f156a04fc00 100644 --- a/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj +++ b/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj @@ -1,13 +1,16 @@ - net461;netstandard2.0 + $(NetCoreAppCurrent);netstandard2.0;net461 enable - + + + + diff --git a/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj b/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj index 892ebb90f85d8..b7b49395879d2 100644 --- a/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj +++ b/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj @@ -1,16 +1,29 @@  - net461;netstandard2.0 + $(NetCoreAppCurrent);netstandard2.0;net461 true enable + - - + + + - + + + + + + + + + + diff --git a/src/libraries/System.Memory.Data/src/System/BinaryData.cs b/src/libraries/System.Memory.Data/src/System/BinaryData.cs index 35c1fcf9ae1cd..b0e56d1e7bae3 100644 --- a/src/libraries/System.Memory.Data/src/System/BinaryData.cs +++ b/src/libraries/System.Memory.Data/src/System/BinaryData.cs @@ -230,9 +230,9 @@ public override unsafe string ToString() /// converted to. /// The to use when serializing to JSON. /// The data converted to the specified type. - public T ToObjectFromJson(JsonSerializerOptions? options = default) + public T? ToObjectFromJson(JsonSerializerOptions? options = default) { - return (T)JsonSerializer.Deserialize(_bytes.Span, typeof(T), options); + return JsonSerializer.Deserialize(_bytes.Span, options); } /// diff --git a/src/libraries/System.Net.Http.WinHttpHandler/pkg/System.Net.Http.WinHttpHandler.pkgproj b/src/libraries/System.Net.Http.WinHttpHandler/pkg/System.Net.Http.WinHttpHandler.pkgproj index e7c9f89774588..ef0dd9c8911c2 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/pkg/System.Net.Http.WinHttpHandler.pkgproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/pkg/System.Net.Http.WinHttpHandler.pkgproj @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.csproj b/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.csproj index 806d5504734c7..abb8c9bcb21f6 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.csproj @@ -1,12 +1,19 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable + - + + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj index e5a57c97107fd..525d50608ff7d 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj @@ -1,17 +1,19 @@ true - netstandard2.0-windows;netstandard2.0;netstandard2.1-windows;netstandard2.1;net461-windows + $(NetCoreAppCurrent)-windows;$(NetcoreAppCurrent);netstandard2.1-windows;netstandard2.1;netstandard2.0-windows;netstandard2.0;net461-windows true enable + - SR.PlatformNotSupported_WinHttpHandler + SR.PlatformNotSupported_WinHttpHandler + + annotations - - - + @@ -99,13 +101,34 @@ Link="Common\System\IO\StreamHelpers.CopyValidation.cs" /> + - + + + + + + + + + + + + + + + + + + + - + + diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseStream.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseStream.cs index 16d0235d55331..d7432541b94b9 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseStream.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseStream.cs @@ -154,7 +154,7 @@ private async Task CopyToAsyncCore(Stream destination, byte[] buffer, Cancellati Debug.Assert(bytesRead > 0); // Write that data out to the output stream -#if NETSTANDARD2_1 +#if NETSTANDARD2_1 || NETCOREAPP await destination.WriteAsync(buffer.AsMemory(0, bytesRead), cancellationToken).ConfigureAwait(false); #else await destination.WriteAsync(buffer, 0, bytesRead, cancellationToken).ConfigureAwait(false); diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpTrailersHelper.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpTrailersHelper.cs index 1254ae8220bc7..9f88437e0c400 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpTrailersHelper.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpTrailersHelper.cs @@ -11,7 +11,7 @@ namespace System.Net.Http internal static class WinHttpTrailersHelper { // UNITTEST is true when building against WinHttpHandler.Unit.Tests, which includes the source file. -#if !NETSTANDARD2_1 && !UNITTEST +#if !NETSTANDARD2_1 && !NETCOREAPP && !UNITTEST // Trailer property name was chosen to be descriptive and be unlikely to collide with a user set property. // Apps and libraries will use this key so it shouldn't change. private const string RequestMessagePropertyName = "__ResponseTrailers"; @@ -24,7 +24,7 @@ private sealed class HttpResponseTrailers : HttpHeaders public static HttpHeaders GetResponseTrailers(HttpResponseMessage response) { -#if NETSTANDARD2_1 || UNITTEST +#if NETSTANDARD2_1 || NETCOREAPP || UNITTEST return response.TrailingHeaders; #else HttpResponseTrailers responseTrailers = new HttpResponseTrailers(); diff --git a/src/libraries/System.Numerics.Tensors/pkg/System.Numerics.Tensors.pkgproj b/src/libraries/System.Numerics.Tensors/pkg/System.Numerics.Tensors.pkgproj index 75855f8b61ef0..372a4d92c7e3f 100644 --- a/src/libraries/System.Numerics.Tensors/pkg/System.Numerics.Tensors.pkgproj +++ b/src/libraries/System.Numerics.Tensors/pkg/System.Numerics.Tensors.pkgproj @@ -11,6 +11,7 @@ + diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs index b54d42ebf768a..3161a4c7e780c 100644 --- a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs @@ -97,7 +97,7 @@ protected Tensor(System.ReadOnlySpan dimensions, bool reverseStride) { } int System.Collections.ICollection.Count { get { throw null; } } bool System.Collections.ICollection.IsSynchronized { get { throw null; } } object System.Collections.ICollection.SyncRoot { get { throw null; } } - object System.Collections.IList.this[int index] { get { throw null; } set { } } + object? System.Collections.IList.this[int index] { get { throw null; } set { } } public abstract System.Numerics.Tensors.Tensor Clone(); public virtual System.Numerics.Tensors.Tensor CloneEmpty() { throw null; } public virtual System.Numerics.Tensors.Tensor CloneEmpty(System.ReadOnlySpan dimensions) { throw null; } @@ -139,15 +139,15 @@ void System.Collections.Generic.IList.Insert(int index, T item) { } void System.Collections.Generic.IList.RemoveAt(int index) { } void System.Collections.ICollection.CopyTo(System.Array array, int index) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - int System.Collections.IList.Add(object value) { throw null; } + int System.Collections.IList.Add(object? value) { throw null; } void System.Collections.IList.Clear() { } - bool System.Collections.IList.Contains(object value) { throw null; } - int System.Collections.IList.IndexOf(object value) { throw null; } - void System.Collections.IList.Insert(int index, object value) { } - void System.Collections.IList.Remove(object value) { } + bool System.Collections.IList.Contains(object? value) { throw null; } + int System.Collections.IList.IndexOf(object? value) { throw null; } + void System.Collections.IList.Insert(int index, object? value) { } + void System.Collections.IList.Remove(object? value) { } void System.Collections.IList.RemoveAt(int index) { } - int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) { throw null; } - bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) { throw null; } + int System.Collections.IStructuralComparable.CompareTo(object? other, System.Collections.IComparer comparer) { throw null; } + bool System.Collections.IStructuralEquatable.Equals(object? other, System.Collections.IEqualityComparer comparer) { throw null; } int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) { throw null; } public virtual System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor() { throw null; } public virtual System.Numerics.Tensors.DenseTensor ToDenseTensor() { throw null; } diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj index ae9c55011f812..ed6005dc03048 100644 --- a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj @@ -1,12 +1,18 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable + - + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj b/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj index b87c193207be5..8dfed2f6283d5 100644 --- a/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj +++ b/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj @@ -1,9 +1,10 @@ true - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable + @@ -13,7 +14,15 @@ - + + + + + + + + + diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs index 9c40bb49a898f..7196a528e9da0 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs @@ -71,7 +71,7 @@ internal SparseTensor(Array fromArray, bool reverseStride = false) : base(fromAr public override T GetValue(int index) { - if (!values.TryGetValue(index, out T value)) + if (!values.TryGetValue(index, out T? value)) { value = Zero; } diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs index 270da201c53b4..83c6947d76a50 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs @@ -705,7 +705,7 @@ internal Enumerator(Tensor tensor) _tensor = tensor; _index = 0; - Current = default; + Current = default!; } public T Current { get; private set; } @@ -722,7 +722,7 @@ public bool MoveNext() } else { - Current = default; + Current = default!; return false; } } @@ -733,7 +733,7 @@ public bool MoveNext() public void Reset() { _index = 0; - Current = default; + Current = default!; } /// diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs index 6adab80d3efac..6a980d9fe1103 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs @@ -36,7 +36,7 @@ internal PinnedBufferMemoryStream(byte[] array) Initialize(ptr, len, len, FileAccess.Read); } -#if (!NETSTANDARD2_0 && !NETFRAMEWORK) +#if !RESOURCES_EXTENSIONS public override int Read(Span buffer) => ReadCore(buffer); public override void Write(ReadOnlySpan buffer) => WriteCore(buffer); diff --git a/src/libraries/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj b/src/libraries/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj index 29115a97cc5a9..a3234c9206913 100644 --- a/src/libraries/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj +++ b/src/libraries/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj @@ -19,6 +19,7 @@ + diff --git a/src/libraries/System.Reflection.Context/ref/System.Reflection.Context.csproj b/src/libraries/System.Reflection.Context/ref/System.Reflection.Context.csproj index 077aa393f180a..39d6843b59f20 100644 --- a/src/libraries/System.Reflection.Context/ref/System.Reflection.Context.csproj +++ b/src/libraries/System.Reflection.Context/ref/System.Reflection.Context.csproj @@ -4,10 +4,15 @@ plan on shipping a new desktop version out of band. Instead add API to a different assembly. --> 4.0.0.0 - netstandard2.0 + $(NetCoreAppCurrent);netstandard2.0 enable + + + + + \ No newline at end of file diff --git a/src/libraries/System.Reflection.Context/src/System.Reflection.Context.csproj b/src/libraries/System.Reflection.Context/src/System.Reflection.Context.csproj index dcbd6df8556d2..d4270565e9352 100644 --- a/src/libraries/System.Reflection.Context/src/System.Reflection.Context.csproj +++ b/src/libraries/System.Reflection.Context/src/System.Reflection.Context.csproj @@ -1,13 +1,17 @@ - netstandard2.1;netstandard2.0 + $(NetCoreAppCurrent);netstandard2.1;netstandard2.0 enable + - SR.PlatformNotSupported_ReflectionContext + + annotations + SR.PlatformNotSupported_ReflectionContext - + + @@ -63,6 +67,12 @@ - + + + + + + diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs index 64c98012957c7..cbbeda045ab17 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs @@ -70,6 +70,10 @@ public override SecurityRuleSet SecurityRuleSet get { return UnderlyingAssembly.SecurityRuleSet; } } +#if NETCOREAPP + [Obsolete] + [RequiresAssemblyFiles] +#endif public override string CodeBase { get { return UnderlyingAssembly.CodeBase; } @@ -85,6 +89,10 @@ public override MethodInfo EntryPoint get { return UnderlyingAssembly.EntryPoint; } } +#if NETCOREAPP + [Obsolete] + [RequiresAssemblyFiles] +#endif public override string EscapedCodeBase { get { return UnderlyingAssembly.EscapedCodeBase; } @@ -188,6 +196,9 @@ public override Type[] GetTypes() return UnderlyingAssembly.GetTypes(); } +#if NETCOREAPP + [Obsolete] +#endif public override bool GlobalAssemblyCache { get { return UnderlyingAssembly.GlobalAssemblyCache; } diff --git a/src/libraries/System.Reflection.MetadataLoadContext/pkg/System.Reflection.MetadataLoadContext.pkgproj b/src/libraries/System.Reflection.MetadataLoadContext/pkg/System.Reflection.MetadataLoadContext.pkgproj index 2f88ba57ac37e..e95f40804d931 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/pkg/System.Reflection.MetadataLoadContext.pkgproj +++ b/src/libraries/System.Reflection.MetadataLoadContext/pkg/System.Reflection.MetadataLoadContext.pkgproj @@ -4,7 +4,7 @@ net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) - + diff --git a/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj b/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj index 3ac0955a841c2..68f6238d74375 100644 --- a/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj +++ b/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj @@ -4,6 +4,7 @@ uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks) + \ No newline at end of file diff --git a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj index 184133af2fab9..99037ae459c92 100644 --- a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj +++ b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj @@ -1,9 +1,14 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable + + + + + \ No newline at end of file diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj index 2787ad7bb9598..adacc9b977e5b 100644 --- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj +++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -1,10 +1,11 @@ true - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 $(DefineConstants);RESOURCES_EXTENSIONS enable + @@ -26,13 +27,26 @@ + + + - + + + + + + + + + + + diff --git a/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs b/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs index ea9fbb4410376..ef40926e32aac 100644 --- a/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs +++ b/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs @@ -33,7 +33,8 @@ private bool ValidateReaderType(string readerType) return false; } - // Issue https://github.com/dotnet/runtime/issues/39292 tracks finding an alternative to BinaryFormatter +// Issue https://github.com/dotnet/runtime/issues/39292 tracks finding an alternative to BinaryFormatter +#pragma warning disable SYSLIB0011 private object ReadBinaryFormattedObject() { if (_formatter == null) @@ -46,7 +47,7 @@ private object ReadBinaryFormattedObject() return _formatter.Deserialize(_store.BaseStream); } - +#pragma warning restore SYSLIB0011 internal sealed class UndoTruncatedTypeNameSerializationBinder : SerializationBinder { diff --git a/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj b/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj index 46ea9e67b0a09..90d23508d8144 100644 --- a/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj +++ b/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj @@ -18,7 +18,7 @@ - + \ No newline at end of file diff --git a/src/libraries/System.Security.Cryptography.Pkcs/pkg/System.Security.Cryptography.Pkcs.pkgproj b/src/libraries/System.Security.Cryptography.Pkcs/pkg/System.Security.Cryptography.Pkcs.pkgproj index 0fd0f8c5b4f17..0eeb304e2fb46 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/pkg/System.Security.Cryptography.Pkcs.pkgproj +++ b/src/libraries/System.Security.Cryptography.Pkcs/pkg/System.Security.Cryptography.Pkcs.pkgproj @@ -5,7 +5,7 @@ net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) - + diff --git a/src/libraries/System.Security.Permissions/pkg/System.Security.Permissions.pkgproj b/src/libraries/System.Security.Permissions/pkg/System.Security.Permissions.pkgproj index cb976d3857d7a..c4591c3ad06d8 100644 --- a/src/libraries/System.Security.Permissions/pkg/System.Security.Permissions.pkgproj +++ b/src/libraries/System.Security.Permissions/pkg/System.Security.Permissions.pkgproj @@ -5,7 +5,7 @@ netcoreapp2.0;net461;uap10.0.16299;$(AllXamarinFrameworks) - + \ No newline at end of file diff --git a/src/libraries/System.ServiceModel.Syndication/pkg/System.ServiceModel.Syndication.pkgproj b/src/libraries/System.ServiceModel.Syndication/pkg/System.ServiceModel.Syndication.pkgproj index 9e1434e92080c..aa80ef9e3dc20 100644 --- a/src/libraries/System.ServiceModel.Syndication/pkg/System.ServiceModel.Syndication.pkgproj +++ b/src/libraries/System.ServiceModel.Syndication/pkg/System.ServiceModel.Syndication.pkgproj @@ -5,7 +5,7 @@ uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks) - + \ No newline at end of file diff --git a/src/libraries/System.Speech/pkg/System.Speech.pkgproj b/src/libraries/System.Speech/pkg/System.Speech.pkgproj index b34710daef76e..fd8103dc52b75 100644 --- a/src/libraries/System.Speech/pkg/System.Speech.pkgproj +++ b/src/libraries/System.Speech/pkg/System.Speech.pkgproj @@ -8,7 +8,7 @@ true - + diff --git a/src/libraries/System.Text.Encoding.CodePages/pkg/System.Text.Encoding.CodePages.pkgproj b/src/libraries/System.Text.Encoding.CodePages/pkg/System.Text.Encoding.CodePages.pkgproj index 7150d80c8aa21..42c9d69940907 100644 --- a/src/libraries/System.Text.Encoding.CodePages/pkg/System.Text.Encoding.CodePages.pkgproj +++ b/src/libraries/System.Text.Encoding.CodePages/pkg/System.Text.Encoding.CodePages.pkgproj @@ -9,7 +9,7 @@ - + diff --git a/src/libraries/System.Text.Json/pkg/System.Text.Json.pkgproj b/src/libraries/System.Text.Json/pkg/System.Text.Json.pkgproj index ac2d21ef89d61..2b335bb4c142e 100644 --- a/src/libraries/System.Text.Json/pkg/System.Text.Json.pkgproj +++ b/src/libraries/System.Text.Json/pkg/System.Text.Json.pkgproj @@ -15,7 +15,7 @@ .NETCoreApp;UAP - + \ No newline at end of file diff --git a/src/libraries/System.Threading.AccessControl/pkg/System.Threading.AccessControl.pkgproj b/src/libraries/System.Threading.AccessControl/pkg/System.Threading.AccessControl.pkgproj index 7c7145ce3e491..02cd7bd85f129 100644 --- a/src/libraries/System.Threading.AccessControl/pkg/System.Threading.AccessControl.pkgproj +++ b/src/libraries/System.Threading.AccessControl/pkg/System.Threading.AccessControl.pkgproj @@ -7,6 +7,7 @@ + \ No newline at end of file diff --git a/src/libraries/System.Threading.AccessControl/ref/System.Threading.AccessControl.csproj b/src/libraries/System.Threading.AccessControl/ref/System.Threading.AccessControl.csproj index 396bb7caf52f3..3f57e01ad4d1b 100644 --- a/src/libraries/System.Threading.AccessControl/ref/System.Threading.AccessControl.csproj +++ b/src/libraries/System.Threading.AccessControl/ref/System.Threading.AccessControl.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net461 + $(NetCoreAppCurrent);netstandard2.0;net461 enable @@ -8,6 +8,11 @@ + + + + + diff --git a/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj b/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj index 4e2e14f344db1..d381ca2177a82 100644 --- a/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj +++ b/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj @@ -1,6 +1,6 @@ - netstandard2.0-windows;netstandard2.0;net461-windows + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netstandard2.0-windows;netstandard2.0;net461-windows true enable @@ -50,6 +50,13 @@ + + + + + + + diff --git a/src/libraries/System.Threading.Channels/pkg/System.Threading.Channels.pkgproj b/src/libraries/System.Threading.Channels/pkg/System.Threading.Channels.pkgproj index 28fa02b0c608e..787314714ce21 100644 --- a/src/libraries/System.Threading.Channels/pkg/System.Threading.Channels.pkgproj +++ b/src/libraries/System.Threading.Channels/pkg/System.Threading.Channels.pkgproj @@ -12,7 +12,7 @@ - +