From 67d563255e3ba3411d1778a48f037850083a8e6b Mon Sep 17 00:00:00 2001 From: Stuart Padley Date: Tue, 21 Nov 2023 06:21:59 -0800 Subject: [PATCH 1/2] Add .Net 8.0 Support --- Samples/Dapper/ElasticDapper.csproj | 2 +- Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj | 2 +- Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj | 2 +- .../ElasticScaleStarterKit/ElasticScaleStarterKit.csproj | 2 +- Samples/ShardSqlCmd/ShardSqlCmd.csproj | 2 +- ...Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj | 4 ++-- .../Query/Exceptions/MultiShardAggregateException.cs | 8 ++++++-- .../Exceptions/MultiShardDataReaderClosedException.cs | 1 + .../Exceptions/MultiShardDataReaderInternalException.cs | 1 + .../Query/Exceptions/MultiShardException.cs | 4 ++++ .../Query/Exceptions/MultiShardPartialReadException.cs | 1 + .../Query/Exceptions/MultiShardSchemaMismatchException.cs | 1 + .../SchemaInformation/SchemaInfoException.cs | 4 ++++ .../ShardMapManager/ShardManagementException.cs | 4 ++++ .../ShardManagement/Store/StoreException.cs | 1 + ...Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj | 2 +- ....Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj | 3 ++- ...Database.ElasticScale.ShardManagement.UnitTests.csproj | 3 ++- 18 files changed, 35 insertions(+), 12 deletions(-) diff --git a/Samples/Dapper/ElasticDapper.csproj b/Samples/Dapper/ElasticDapper.csproj index 8305c65..fa568df 100644 --- a/Samples/Dapper/ElasticDapper.csproj +++ b/Samples/Dapper/ElasticDapper.csproj @@ -1,6 +1,6 @@ - net6.0 + net6.0;net8.0 Exe diff --git a/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj b/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj index bd76408..30bbb7a 100644 --- a/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj +++ b/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj @@ -1,6 +1,6 @@ - net6.0 + net6.0;net8.0 Exe diff --git a/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj b/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj index 7a49864..b86cb14 100644 --- a/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj +++ b/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj @@ -1,6 +1,6 @@  - net6.0 + net6.0;net8.0 Exe diff --git a/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj b/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj index a523329..2f9f797 100644 --- a/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj +++ b/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj @@ -1,6 +1,6 @@ - net6.0 + net6.0;net8.0 Exe diff --git a/Samples/ShardSqlCmd/ShardSqlCmd.csproj b/Samples/ShardSqlCmd/ShardSqlCmd.csproj index 432852a..5457ab3 100644 --- a/Samples/ShardSqlCmd/ShardSqlCmd.csproj +++ b/Samples/ShardSqlCmd/ShardSqlCmd.csproj @@ -1,7 +1,7 @@  - net6.0 + net6.0;net8.0 Exe diff --git a/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj b/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj index ac4c846..982cdc2 100644 --- a/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj +++ b/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj @@ -7,9 +7,9 @@ en-US 2.4.0-preview2 Microsoft - net6.0 + net6.0;net8.0 Microsoft;Elastic;Scale;Azure;SQL;DB;Database;Shard;Sharding;Management;Query;azureofficial - Updated to net6.0 and migrated from System.Data.SqlClient to Microsoft.Data.SqlClient. + Added net8.0 support Icon.png https://github.com/Azure/elastic-db-tools MIT diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardAggregateException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardAggregateException.cs index b274eca..999f335 100644 --- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardAggregateException.cs +++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardAggregateException.cs @@ -60,6 +60,7 @@ public MultiShardAggregateException(Exception innerException) /// /// The object that holds the serialized object data. /// The contextual information about the source or destination. + [Obsolete] protected MultiShardAggregateException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -113,16 +114,19 @@ public MultiShardAggregateException(string message, IEnumerable inner _innerExceptions = new ReadOnlyCollection(exceptions); } -#endregion Additional Constructors + #endregion Additional Constructors -#region Serialization Support + #region Serialization Support /// /// Populates a SerializationInfo with the data needed to serialize the target object. /// /// The SerializationInfo to populate with data. /// The destination (see StreamingContext) for this serialization. + [Obsolete] +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member public override void GetObjectData(SerializationInfo info, StreamingContext context) +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member { base.GetObjectData(info, context); info.AddValue("InnerExceptions", _innerExceptions); diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderClosedException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderClosedException.cs index 946dab2..d0ce070 100644 --- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderClosedException.cs +++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderClosedException.cs @@ -63,6 +63,7 @@ public MultiShardDataReaderClosedException() /// /// The StreamingContext that contains contextual information about the source or destination. /// + [Obsolete] protected MultiShardDataReaderClosedException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderInternalException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderInternalException.cs index b1c4923..2db6a70 100644 --- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderInternalException.cs +++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardDataReaderInternalException.cs @@ -62,6 +62,7 @@ public MultiShardDataReaderInternalException(string message, Exception innerExce /// /// The that contains contextual information about the source or destination. /// + [Obsolete] protected MultiShardDataReaderInternalException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs index 8c64223..f7b6b82 100644 --- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs +++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs @@ -121,6 +121,7 @@ public MultiShardException() /// /// The that contains contextual information about the source or destination. /// + [Obsolete] protected MultiShardException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -136,7 +137,10 @@ protected MultiShardException(SerializationInfo info, StreamingContext context) /// /// object to populate with data. /// The destination object for this serialization. + [Obsolete] +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member public override void GetObjectData(SerializationInfo info, StreamingContext context) +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member { base.GetObjectData(info, context); info.AddValue("ShardLocation", _shardLocation); diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs index e0d1de1..f4a0373 100644 --- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs +++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs @@ -79,6 +79,7 @@ public MultiShardPartialReadException() /// /// The that contains contextual information about the source or destination. /// + [Obsolete] protected MultiShardPartialReadException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardSchemaMismatchException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardSchemaMismatchException.cs index 7463e7e..8c5792d 100644 --- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardSchemaMismatchException.cs +++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardSchemaMismatchException.cs @@ -71,6 +71,7 @@ public MultiShardSchemaMismatchException() /// /// The that contains contextual information about the source or destination. /// + [Obsolete] protected MultiShardSchemaMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs index 8fd945e..6f566c5 100644 --- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs +++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs @@ -81,6 +81,7 @@ public SchemaInfoException(SchemaInfoErrorCode code, string message, Exception i /// /// The object that holds the serialized object data /// The contextual information about the source or destination + [Obsolete] private SchemaInfoException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -92,7 +93,10 @@ private SchemaInfoException(SerializationInfo info, StreamingContext context) /// /// The SerializationInfo to populate with data. /// The destination (see StreamingContext) for this serialization. + [Obsolete] +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member public override void GetObjectData(SerializationInfo info, StreamingContext context) +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member { if (info != null) { diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardManagementException.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardManagementException.cs index 086efed..f1f7842 100644 --- a/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardManagementException.cs +++ b/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardManagementException.cs @@ -326,6 +326,7 @@ internal ShardManagementException(ShardManagementErrorCategory category, ShardMa /// /// The object that holds the serialized object data /// The contextual information about the source or destination + [Obsolete] private ShardManagementException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -339,7 +340,10 @@ private ShardManagementException(SerializationInfo info, StreamingContext contex /// /// The SerializationInfo to populate with data. /// The destination (see StreamingContext) for this serialization. + [Obsolete] +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member public override void GetObjectData(SerializationInfo info, StreamingContext context) +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member { if (info != null) { diff --git a/Src/ElasticScale.Client/ShardManagement/Store/StoreException.cs b/Src/ElasticScale.Client/ShardManagement/Store/StoreException.cs index ccabac7..b86352f 100644 --- a/Src/ElasticScale.Client/ShardManagement/Store/StoreException.cs +++ b/Src/ElasticScale.Client/ShardManagement/Store/StoreException.cs @@ -71,6 +71,7 @@ internal StoreException(string format, Exception inner, params object[] args) /// /// The object that holds the serialized object data /// The contextual information about the source or destination + [Obsolete] private StoreException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj b/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj index cfb54d1..3eddb2d 100644 --- a/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj +++ b/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj @@ -1,6 +1,6 @@  - net6.0 + net6.0;net8.0 $(NoWarn);SYSLIB0011; diff --git a/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj b/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj index 97b9f29..8e1996a 100644 --- a/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj +++ b/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj @@ -1,6 +1,7 @@  - net6.0 + net6.0;net8.0 + true false $(NoWarn);CS8073; diff --git a/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj b/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj index d755f90..6c8c968 100644 --- a/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj +++ b/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj @@ -1,6 +1,7 @@ - net6.0 + net6.0;net8.0 + true false 0649;$(NoWarn) From 3ee478a2e0b546fdda07034b07c771cc5eb9bc86 Mon Sep 17 00:00:00 2001 From: Stuart Padley Date: Thu, 18 Jan 2024 04:58:42 -0800 Subject: [PATCH 2/2] update release notes --- .../Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj b/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj index 7bcd6db..55b4d40 100644 --- a/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj +++ b/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj @@ -9,7 +9,7 @@ Microsoft net6.0;net8.0 Microsoft;Elastic;Scale;Azure;SQL;DB;Database;Shard;Sharding;Management;Query;azureofficial - Added net8.0 support + Added net8.0 support, updated dependent nuget packages to latest (due to CVEs) Icon.png https://github.com/Azure/elastic-db-tools MIT