Skip to content

Commit d4e1273

Browse files
authored
Merge pull request #4 from akinbender/copilot/update-to-dotnet-10
Update UsbSerialForMacOS to .NET 10
2 parents 224928c + c1d88ce commit d4e1273

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
[![NuGet](https://img.shields.io/nuget/v/UsbSerialForMacOS.svg?label=NuGet&logo=nuget)](https://www.nuget.org/packages/UsbSerialForMacOS/)
66

77
**UsbSerialForMacOS** is a .NET binding for a native Swift library that enables serial port communication on macOS and Mac Catalyst.
8-
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.
8+
It allows .NET MAUI and .NET 10+ 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.
99

1010
## Usage
1111

12-
1. Add the NuGet package to your .NET 8+ Mac or Mac Catalyst project.
12+
1. Add the NuGet package to your .NET 10+ Mac or Mac Catalyst project.
1313
2. Add following to Entitlements.plist
1414

1515
```xml
@@ -36,7 +36,7 @@ if (ports.Length > 0)
3636

3737
| Platform | Target Framework | Architectures | Minimum macOS Version |
3838
|-------------- |----------------------|-----------------------|-----------------------|
39-
| macOS | net8.0-macos | x64, arm64 | 15.0+ |
40-
| Mac Catalyst | net8.0-maccatalyst | x64, arm64 | 18.0+ |
39+
| macOS | net10.0-macos | x64, arm64 | 15.0+ |
40+
| Mac Catalyst | net10.0-maccatalyst | x64, arm64 | 18.0+ |
4141

42-
> **.NET 8.0 or higher is required. Native libraries are included for both macOS and Mac Catalyst.**
42+
> **.NET 10.0 or higher is required. Native libraries are included for both macOS and Mac Catalyst.**

UsbSerialForMacOS.MauiSample/UsbSerialForMacOS.MauiSample.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0-maccatalyst</TargetFramework>
4+
<TargetFramework>net10.0-maccatalyst</TargetFramework>
55
<RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>
66
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net10.0-tizen</TargetFrameworks> -->
88

99
<!-- Note for MacCatalyst:
1010
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
@@ -59,7 +59,7 @@
5959
<ItemGroup>
6060
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
6161
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
62-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
62+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0" />
6363
</ItemGroup>
6464

6565
<ItemGroup>

UsbSerialForMacOS/UsbSerialForMacOS.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-macos;net8.0-maccatalyst</TargetFrameworks>
4+
<TargetFrameworks>net10.0-macos;net10.0-maccatalyst</TargetFrameworks>
55
<RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
@@ -46,8 +46,8 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49-
<NativeReference Include="Native/build/dylib/macos/x86_64/libUsbSerialForMacOS.dylib" Kind="Dynamic" Condition="'$(TargetFramework)' == 'net8.0-macos'" />
50-
<NativeReference Include="Native/build/dylib/maccatalyst/x86_64/libUsbSerialForMacOS.dylib" Kind="Dynamic" Condition="'$(TargetFramework)' == 'net8.0-maccatalyst'" />
49+
<NativeReference Include="Native/build/dylib/macos/x86_64/libUsbSerialForMacOS.dylib" Kind="Dynamic" Condition="'$(TargetFramework)' == 'net10.0-macos'" />
50+
<NativeReference Include="Native/build/dylib/maccatalyst/x86_64/libUsbSerialForMacOS.dylib" Kind="Dynamic" Condition="'$(TargetFramework)' == 'net10.0-maccatalyst'" />
5151
</ItemGroup>
5252

5353
</Project>

0 commit comments

Comments
 (0)