-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for .NET 9 #2946
Add support for .NET 9 #2946
Conversation
…msbuild." This reverts commit c010bd3.
…A2022 and IL2093 errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am curious - is there any net9.0 API that's actually needed/used? If not, is there a specific reason to add the net9.0 TFM?
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlNormalizer.cs
Show resolved
Hide resolved
@roji JSON support in SqlDbType: dotnet/runtime#103925 |
@David-Engel of course, I forgot about that, thanks :) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2946 +/- ##
==========================================
- Coverage 72.67% 72.60% -0.08%
==========================================
Files 285 285
Lines 59160 59162 +2
==========================================
- Hits 42997 42954 -43
- Misses 16163 16208 +45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionString.cs
Outdated
Show resolved
Hide resolved
namespace System.IO | ||
{ | ||
// Helpers to read/write Span/Memory<byte> to Stream before netstandard 2.1 | ||
internal static class StreamExtensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a shared path we can put this which both the test projects and M.D.S can refer to? It's identical to src/Microsoft.Data.SqlClient/src/System/IO/StreamExtensions.netfx.cs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, I would create a Common/Shared project that both test and src projects depend on, but this class is too small for that. If we have more cases like this, we can consider coming up with a common project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdaigle Like I said in the previous PR, internals of the MDS projects should be visible to the test projects. If they aren't, then we should make them so.
@cheenamalhotra I personally don't think we need to add another project for this purpose, if we leverage internalsvisibleto. We can discuss more if we need to, tho.
src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/VirtualSecureModeEnclaveProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs
Outdated
Show resolved
Hide resolved
… transitive dependency.
…king transitive dependency.
...sts/tools/Microsoft.Data.SqlClient.ExtUtilities/Microsoft.Data.SqlClient.ExtUtilities.csproj
Outdated
Show resolved
Hide resolved
namespace System.IO | ||
{ | ||
// Helpers to read/write Span/Memory<byte> to Stream before netstandard 2.1 | ||
internal static class StreamExtensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, I would create a Common/Shared project that both test and src projects depend on, but this class is too small for that. If we have more cases like this, we can consider coming up with a common project.
@@ -180,7 +180,9 @@ static DataTestUtility() | |||
AliasName = c.AliasName; | |||
IsJsonSupported = c.IsJsonSupported; | |||
|
|||
#if NETFRAMEWORK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ServicePointManager is marked as obsolete in Net 9.
https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0014
I removed the call to no effect in the tests, so it didn't seem to be changing anything. But if there's any concern, I can add a suppression instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdaigle Are you sure it's the ServicePointManager? I had seen similar warnings in the code when using Tls12 security type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in general. I think we should make InternalsVisibleTo test projects (I think that change was only made in the clientx branch) so we can avoid duplication of the stream extensions. But I won't hold up approval on that.
Enhancements:
Fixes:
GetProviderSpecificFieldType
andGetFieldType
in netcore ref project.Package Versions:
Test Dependencies: