You are looking for the wrong file, the correct one in the corefx repository. This one .
Please note that it is special, it contains only ads. This is the reference assembly that your compiler uses. As you can tell, it does not have a Yield () method, therefore guaranteed eek! from the compiler. The difference between a reference assembly and an implementation assembly in the GAC is what happened a long time ago, look in the C: \ Program Files (x86) \ Reference Assemblies directory on a Windows-based computer.
The exact reasons why an element or type is omitted are not always obvious. From what I saw, the factors that play a role are as follows:
The type or member is simply not supported by the CLC.NETCore version. Originally designed as a small version of the CLR, designed for mobile devices and easily downloaded, Silverlight is the most recognizable member of this family. Thanks to an additional feature that is small also makes porting the CLR to another platform easier, .NETCore served as the CoreCLR boot machine, as it ran on Linux and OSX was a strong target. AppDomain is a good example.
Perhaps it is not yet implemented in each OS or it does not match the .NETStandard profile. Saving it from a referenced assembly is a very simple way to prevent accidental use of the program and cause very complex diagnostics of runtime exceptions.
The .NET team wanted to give it up, CoreFx is a terrific opportunity to cut dead wood or pursue new best practices. Lots of examples of this, String.GetEnumerator () is the one that programmers usually drink, the excuse I heard from a team member that it is not efficient enough. Deprecated .NET 1.x classes, such as ArrayList, are more obvious.
I cannot be sure why Thread.Yield () fell to the floor, but it is heavily used in the CoreCLR implementation (YieldProcessor and __SwitchToThread), so there is a high chance that it is suitable for a bullet. 3. Microsoft is working hard to make their operating systems and frameworks more friendly to mobile devices, the kind of platform on which they competed poorly. Themes are definitely not friendly.
Good chances are they want you to use Task.Yield ().
source share