I do not know if this is a good place for this issue or not, but after updating the Microsoft.Extensions.DependencyInjection.Abstractions to version 5.0.0 it does not recognize the RuntimeInformation and OSPlatform classes.
This repo can reproduce this problem.
The strange thing is that these classes are available in versions 4.5 and 4.7, but not in 4.6!

@joperezr @ericstj - thoughts here?
The 3.1 versions of Microsoft.Extensions.DependencyInjection.Abstractions had the following dependencies:

In 5.0, along with moving repos, the tooling that makes the packages changed. And now the 5.0 dependencies are listed as:

So for the net461 build, is the issue that now netstandard2.0 isn't coming into the compile graph anymore?
RuntimeInformation and OSPlatform doesn't come from Microsoft.Extensions.DependencyInjection.Abstractions package, but instead from System.Runtime.InteropServices.RuntimeInformation package. It is possible that this worked in the past with older versions of the Extensions package due to a transitive dependency to RuntimeInformation, but looks like the newest package doesn't have that transitive dependency any longer (most likely because we added the net461 build). This means that now consumer apps would have to explicitly depend on the RuntimeInformation package if they want to use those types on net461+ which is no different to other packages whenever we decide to remove some transitive dependency for some framework.
BTW, having apps require to have an explicit dependency on RuntimeInformation when using those types should be the expectation, so I don't think there is anything we would want to fix here.
Actually just looked at it again and what was happening here before (and the reason why it worked) is that when folks used this package in net461 it was causing the netstandard facades to be includded in your project, which in this particular case was helping resolve these two types. That is why @eerhardt you don't see a dependency explicitly on the RuntimeInformation package but it was still getting pulled in. Now this package doesn't require the netstandard facades any longer (also resulting in your bin output folder for net461 to be much cleaner 馃槃) but that is also meaning in this particular case that these two types are not resolving. As explained above, a simple package Reference to the RuntimeInformation package should resolve this.
Thanks for the investigation, @joperezr. I'm going to close this issue as "by design" since there isn't a change needed in our NuGet packages.
@mjebrahimi - like @joperezr mentions above, you can resolve this by adding a PackageReference to https://www.nuget.org/packages/System.Runtime.InteropServices.RuntimeInformation. Thanks for reporting the issue. This information can unblock someone else if they run into the same problem.
Most helpful comment
Thanks for the investigation, @joperezr. I'm going to close this issue as "by design" since there isn't a change needed in our NuGet packages.
@mjebrahimi - like @joperezr mentions above, you can resolve this by adding a PackageReference to https://www.nuget.org/packages/System.Runtime.InteropServices.RuntimeInformation. Thanks for reporting the issue. This information can unblock someone else if they run into the same problem.