dotnet / standard

This repo is building the .NET Standard
3.07k stars 428 forks source link

Class ValueTask has different definitions between .Net Standard 2.1 and .Net 5 #1788

Closed vsfeedback closed 3 years ago

vsfeedback commented 3 years ago

This issue has been moved from a ticket on Developer Community.


Class ValueTask has different definitions between .Net Standard 2.1 and .Net 5: static property ValueTask.CompletedTask and static methods ValueTask.FromResult, ValueTask.FromCanceled and ValueTask.FromException are not available in .Net Standard 2.1.

Regards, Paco.


Original Comments

Feedback Bot on 3/29/2021, 10:45 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

terrajobst commented 3 years ago

Those APIs were added after .NET Standard 2.1 shipped. We can't add new APIs to an existing .NET Standard version. This would require a new .NET Standard version, but we don't plan on shipping one because .NET Core and .NET Standard were merged.

In order to use these APIs, you need to target net5.0.