Skip to content
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

.NET Standard compat: Avoid usages of CallContext #2197

Closed
jdom opened this issue Sep 21, 2016 · 0 comments
Closed

.NET Standard compat: Avoid usages of CallContext #2197

jdom opened this issue Sep 21, 2016 · 0 comments
Milestone

Comments

@jdom
Copy link
Member

jdom commented Sep 21, 2016

In our .NET Standard solution I temporarily removed the usages of CallContext from our RequestContext class, as it's not supported in .NET Standard. See 772dde7 for the commit where this was excluded.

We need to find an alternative. Without too much investigation on my end, it seems that the recommended alternative is to use AsyncLocal<T> which is available in both .NET Standard and .NET 4.6+. If we go with this approach, we should probably keep this code under conditional compilation for the mean time, as we are not ready to update the dependency for the main solution (non-vNext) to 4.6 just yet (soon though).

In order to open the solution that compiles using .NET Standard (and hence easy to check what is available in that environment), check out this readme

@jdom jdom added this to the CoreCLR milestone Sep 21, 2016
@sergeybykov sergeybykov modified the milestones: 2.0.0, CoreCLR Nov 3, 2016
@jdom jdom closed this as completed Nov 22, 2016
@ghost ghost locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants