-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
System.IO.Ports currently targets Linux, OSX and FreeBSD even though their implementation is 95% identical. To reduce package size and build times runtime checks could be used for the 5% diverging functionality:
runtime/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
Lines 109 to 117 in 85aebc4
| <ItemGroup Condition="'$(TargetsLinux)' == 'true'"> | |
| <Compile Include="System\IO\Ports\SerialPort.Linux.cs" /> | |
| </ItemGroup> | |
| <ItemGroup Condition=" '$(TargetsOSX)' == 'true' "> | |
| <Compile Include="System\IO\Ports\SerialPort.OSX.cs" /> | |
| </ItemGroup> | |
| <ItemGroup Condition=" '$(TargetsFreeBSD)' == 'true' "> | |
| <Compile Include="System\IO\Ports\SerialPort.FreeBSD.cs" /> | |
| </ItemGroup> |
As an example, when adding NetCoreAppCurrent configurations, the package grows disproportionally because of the amount of runtime specific assemblies.