I have an app which works on Linux and Windows. I need to know where the app is working for use difference code. Thanks
相关问题
- Dotnet Core API - Get the URL of a controller meth
- Why am I unable to run dotnet tool install --globa
- Can I use MvcJsonOptions configured during Startup
- Singleton with AsyncLocal vs Scope Service
- What would prevent code running in a Docker contai
相关文章
- DotNet Core console app: An assembly specified in
- EF Core 'another instance is already being tra
- Re-target .NET Core to net471, net 472
- How to replace Middleware in integration tests pro
- Why CsvHelper not reading from MemoryStream?
- How to define function that returns html in asp.ne
- Publishing a Self-contained Console app fails
- Calling a .Net Framework 4 (or Mono) assembly from
You are probably looking for
System.Runtime.InteropServices.RuntimeInformation
with theIsOsPlatform
function to do runtime checks.Have look at the video tutorial https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information of the ASP.NET Monsters.