Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cheenamalhotra merged 3 commits intomainfromdev/cheena/netst
Jun 4, 2025
Merged

Conversation

cheenamalhotra
Copy link
Member

@cheenamalhotracheenamalhotra commentedMay 28, 2025
edited
Loading

Addresses#3316

This update brings back .NET Standard DLLs for the lib and ref folders - following the pattern fromSystem.Data.SqlClient NuGet package.

The new NuGet package folder structure shall look like:

lib\    net462\    net8.0\    net9.0\    netstandard2.0\ref\    net462\    net8.0\    net9.0\    netstandard2.0\runtimes\    unix\        lib\            net8.0\            net9.0\    win\        lib\            net462\            net8.0\            net9.0\

edwardneal and 0xfeeddeadbeef reacted with hooray emoji
@cheenamalhotracheenamalhotra added this to the6.1-preview2 milestoneMay 28, 2025
@CopilotCopilotAI review requested due to automatic review settingsMay 28, 2025 04:30
@cheenamalhotracheenamalhotra requested a review froma team as acode ownerMay 28, 2025 04:30
Copy link
Contributor

@CopilotCopilotAI left a 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.

FileDescription
tools/specs/Microsoft.Data.SqlClient.nuspecAdded a new targetFramework group for netstandard2.0 and updated dependencies accordingly.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csprojExpanded TargetFrameworks to include netstandard2.0 and introduced conditions for BuildForLib output paths.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csWrapped some API members with conditional compilation (#if NET) for targeted builds.
build.projAdded a BuildNetStandard target and updated dependencies to incorporate .NET Standard builds.

@cheenamalhotracheenamalhotra linked an issueMay 28, 2025 that may beclosed by this pull request
@codecovCodecov
Copy link

codecovbot commentedMay 28, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.97%. Comparing base(14bee54) to head(d3999a5).
Report is 33 commits behind head on main.

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
FlagCoverage Δ
addons92.58% <ø> (ø)
netcore72.34% <ø> (+4.00%)⬆️
netfx66.46% <ø> (+0.29%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@benrr101
Copy link
Contributor

@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.

@cheenamalhotra
Copy link
MemberAuthor

cheenamalhotra commentedMay 29, 2025
edited
Loading

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.

ErikEJ reacted with hooray emoji

Copy link
Contributor

@David-EngelDavid-Engel left a 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?

@cheenamalhotra
Copy link
MemberAuthor

I would add that somewhere it's easy to find, should we consider adding to the NuGet package readme itself?

@k290
Copy link

k290 commentedJun 4, 2025
edited
Loading

What about 2.1 which was also previously supported in Microsoft.Data.SqlClient?

ErikEJ reacted with laugh emoji

@ErikEJ
Copy link
Contributor

@k290 Target .NET 8.0 iso NET Standard 2.1 (earlier versions of .NET (Core) are out of support)

@cheenamalhotra
Copy link
MemberAuthor

What about 2.1 which was also previously supported in Microsoft.Data.SqlClient?

There isn't any API difference in those, and 'netstandard2.0' dll will be resolved when an app targets .NET Standard 2.1.

@cheenamalhotracheenamalhotra merged commit01f85bf intomainJun 4, 2025
251 checks passed
@cheenamalhotracheenamalhotra deleted the dev/cheena/netst branchJune 4, 2025 17:39
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@edwardnealedwardnealedwardneal left review comments

Copilot code reviewCopilotCopilot left review comments

@mdaiglemdaiglemdaigle approved these changes

@David-EngelDavid-EngelDavid-Engel approved these changes

@paulmedynskipaulmedynskipaulmedynski approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
6.1-preview2
Development

Successfully merging this pull request may close these issues.

Bring back .NET Standard support
8 participants
@cheenamalhotra@benrr101@k290@ErikEJ@mdaigle@David-Engel@paulmedynski@edwardneal

[8]ページ先頭

©2009-2025 Movatter.jp