UsbSerialForMacOS 0.9.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package UsbSerialForMacOS --version 0.9.2
NuGet\Install-Package UsbSerialForMacOS -Version 0.9.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UsbSerialForMacOS" Version="0.9.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UsbSerialForMacOS" Version="0.9.2" />
<PackageReference Include="UsbSerialForMacOS" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UsbSerialForMacOS --version 0.9.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: UsbSerialForMacOS, 0.9.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UsbSerialForMacOS@0.9.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UsbSerialForMacOS&version=0.9.2
#tool nuget:?package=UsbSerialForMacOS&version=0.9.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
UsbSerialForMacOS
UsbSerialForMacOS is a .NET binding for a native Swift library that enables serial port communication on macOS and Mac Catalyst.
It allows .NET MAUI and .NET 8+ apps to enumerate, open, read from, and write to serial devices (such as USB-to-serial adapters and 3D printers) using a simple C# API.
Usage
- Add the NuGet package to your .NET 8+ Mac or Mac Catalyst project.
- Add following to Entitlements.plist
<key>com.apple.security.device.serial</key>
<true/>
- Use the
UsbSerialManagerclass to enumerate and communicate with serial devices.
using UsbSerialForMacOS;
var manager = new UsbSerialManager();
var ports = manager.AvailablePorts();
if (ports.Length > 0)
{
bool opened = manager.Open(ports[0], 115200);
// Write/read as needed
manager.Close();
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-maccatalyst18.0 is compatible. net8.0-macos15.0 is compatible. net9.0-maccatalyst was computed. net9.0-macos was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0-maccatalyst18.0
- No dependencies.
-
net8.0-macos15.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.