-
Notifications
You must be signed in to change notification settings - Fork 308
Re-introduce .NET Standard 2.0 DLLs #3381
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR re-introduces .NET Standard 2.0 DLLs for both the lib and ref folders, aligning with the pattern used by the System.Data.SqlClient NuGet package.
- Updated the nuspec file to add a new targetFramework group for netstandard2.0 and adjust dependency versions.
- Modified the ref project file to include netstandard2.0 and configure proper output paths using the BuildForLib flag.
- Enhanced the build.proj file to include a BuildNetStandard target for building the .NET Standard DLLs.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
tools/specs/Microsoft.Data.SqlClient.nuspec | Added a new targetFramework group for netstandard2.0 and updated dependencies accordingly. |
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj | Expanded TargetFrameworks to include netstandard2.0 and introduced conditions for BuildForLib output paths. |
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs | Wrapped some API members with conditional compilation (#if NET) for targeted builds. |
build.proj | Added a BuildNetStandard target and updated dependencies to incorporate .NET Standard builds. |
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3381 +/- ##
==========================================
+ Coverage 65.07% 67.97% +2.89%
==========================================
Files 298 298
Lines 65515 65525 +10
==========================================
+ Hits 42634 44538 +1904
+ Misses 22881 20987 -1894
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@cheenamalhotra Will we be reintroducing tests for netstandard builds? I'm concerned that since we removed a lot of code that was specific to netstandard implementation (at least in the interop space), allowing people to compile against ref binaries for netstandard will result in runtime errors. Just checking that this is something we considered. |
No, because we are only adding compile time assemblies for .NET Standard, not runtime assemblies, we don't need to add changes to src projects and therefore only ref projects are built for .NET Standard target. Also, .NET Standard is not a runtime framework, it's only a target framework for libraries and reusable components that are shipped as NuGet packages. When a "runtime" framework targets them, respective runtime assemblies are fetched from dependency packages and resolved by .NET/MsBuild SDK. This is the model of how SDS NuGet package is shipped, we're using the same for MDS now. |
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.
LGTM
Where should we document that the NetStandard DLL isn't supported at runtime?
Addresses #3316
This update brings back .NET Standard DLLs for the lib and ref folders - following the pattern from System.Data.SqlClient NuGet package.
The new NuGet package folder structure shall look like: