Skip to content

Commit

Permalink
Remove platform check on Linux for Mono.
Browse files Browse the repository at this point in the history
A platform check was introduced to ensure that for NET Standard 1.5, the user has the library nserial 1.1.0 or later installed. This is useful for Mono, but not required.

Issue: DOTNET-81
  • Loading branch information
jcurl committed Mar 25, 2017
1 parent 0ebe8e8 commit 8e66cc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/Native/UnixNativeSerial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ public UnixNativeSerial()
throw new PlatformNotSupportedException("Can't initialise platform library");
}

#if NETSTANDARD15
// On NetStandard 1.5, we must have proper exception handling
try {
// These methods were first added in libnserial 1.1
m_Dll.netfx_errno(0);
} catch (System.EntryPointNotFoundException) {
throw new PlatformNotSupportedException("Must have libnserial 1.1.0 or later on .NET Standard 1.5");
}
#endif
}

private void ThrowException()
Expand Down

0 comments on commit 8e66cc1

Please sign in to comment.