In a .NET Standard project is there a way to determine if the DLL is run in .NET Core or the regular .NET Framework at runtime?
I want to handle things differently for different .NET platforms.
Use the RuntimeInformation.FrameworkDescription Property from the System.Runtime.InteropServices
namespace.
Returns a string that indicates the name of the .NET installation on which an app is running.
The property returns one of the following strings:
".NET Core".
".NET Framework".
".NET Native".