Skip to content

Add NetCoreAppCurrent configurations to Microsoft.Extensions libraries #61867

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

Merged
merged 5 commits into from
Dec 1, 2021

Conversation

eerhardt
Copy link
Member

This makes all Extensions projects consistent in which TFMs they target. This way we don't need to add new TFMs during development of a new feature.

Fix #54012

It is probably easiest to review the commits separately.

  1. Change all Extensions .csprojs to support NetCoreAppCurrent and NetCoreAppMinimum TFMs. Also make the .csprojs use a consistent pattern.
  2. Fix code warnings/errors now that the Extensions libraries are building for NetCoreApp.

@buyaa-n - can you review the supported platforms work I did in the 2nd commit? (note that I ran into dotnet/roslyn-analyzers#4282 and worked around it with redundant Debug.Asserts).

This makes all Extensions projects consistent in which TFMs they target. This way we don't need to add new TFMs during development of a new feature.

Fix dotnet#54012
@ghost
Copy link

ghost commented Nov 20, 2021

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Nov 20, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

This makes all Extensions projects consistent in which TFMs they target. This way we don't need to add new TFMs during development of a new feature.

Fix #54012

It is probably easiest to review the commits separately.

  1. Change all Extensions .csprojs to support NetCoreAppCurrent and NetCoreAppMinimum TFMs. Also make the .csprojs use a consistent pattern.
  2. Fix code warnings/errors now that the Extensions libraries are building for NetCoreApp.

@buyaa-n - can you review the supported platforms work I did in the 2nd commit? (note that I ran into dotnet/roslyn-analyzers#4282 and worked around it with redundant Debug.Asserts).

Author: eerhardt
Assignees: -
Labels:

area-Infrastructure-libraries, new-api-needs-documentation

Milestone: -

}

if ((_activityTrackingOption & ActivityTrackingOptions.Baggage) != 0)
{
// Only access activity.Baggage as every call leads to an allocation
IEnumerable<KeyValuePair<string, string?>> baggage = activity.Baggage;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?>>

why we removed the nullability here? Activity.Baggage is already defined as nullable I guess

public IEnumerable<KeyValuePair<string, string?>> Baggage

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the rest of the library doesn't have nullability enabled. And since we don't, the compiler is warning. These changes will likely be undone when we enable nullability in this library.

Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some questions, LGTM otherwise. I assume @ericstj will take a look too.

@buyaa-n
Copy link
Contributor

buyaa-n commented Nov 22, 2021

@buyaa-n - can you review the supported platforms work I did in the 2nd commit? (note that I ran into dotnet/roslyn-analyzers#4282 and worked around it with redundant Debug.Asserts).

LGTM, thanks!

@eerhardt eerhardt merged commit 2d6cc77 into dotnet:main Dec 1, 2021
@eerhardt eerhardt deleted the NetCoreAppExtensions branch December 1, 2021 23:33
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NetCoreAppCurrent configurations to every library that targets .NETStandard or .NETCoreApp
3 participants