Here is my C# code snippet:
if (Environment.IsWindows) {
_sessionAddress = GetSessionBusAddressFromSharedMemory();
}
...
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
private static string GetSessionBusAddressFromSharedMemory() {
...
}
When I run the build, I get an error:
error CA1416: 'GetSessionBusAddressFromSharedMemory()' is supported on 'windows'
My logic is to invoke the method only when I am on Windows. How do I turn this warning off when building on Ubuntu? Regards.