diff --git a/ExtLibs/Comms/MissionPlanner.Comms.csproj b/ExtLibs/Comms/MissionPlanner.Comms.csproj
index b5ada09404..37a551e170 100644
--- a/ExtLibs/Comms/MissionPlanner.Comms.csproj
+++ b/ExtLibs/Comms/MissionPlanner.Comms.csproj
@@ -24,6 +24,7 @@
+
@@ -44,7 +45,7 @@
-
+
diff --git a/MainV2.cs b/MainV2.cs
index 98ae5fdfe0..a9ca4b344c 100644
--- a/MainV2.cs
+++ b/MainV2.cs
@@ -3601,14 +3601,18 @@ protected override void OnLoad(EventArgs e)
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
MissionPlanner.Comms.CommsBLE.SerialPort_GetCustomPorts();
+#if !LIB
MissionPlanner.Comms.CommsWinUSB.SerialPort_GetCustomPorts();
+#endif
}
catch { }
// add the custom port creator
CustomPortList.Add(new Regex("BLE_.*"), (s1, s2) => { return new CommsBLE() { PortName = s1, BaudRate = int.Parse(s2) }; });
+#if !LIB
CustomPortList.Add(new Regex("WINUSB_VID_.*"), (s1, s2) => { return new CommsWinUSB() { PortName = s1, BaudRate = int.Parse(s2) }; });
+#endif
this.ResumeLayout();