Bathos.Platform.MacOS 1.2.0

dotnet add package Bathos.Platform.MacOS --version 1.2.0
                    
NuGet\Install-Package Bathos.Platform.MacOS -Version 1.2.0
                    
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="Bathos.Platform.MacOS" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bathos.Platform.MacOS" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Bathos.Platform.MacOS" />
                    
Project file
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 Bathos.Platform.MacOS --version 1.2.0
                    
#r "nuget: Bathos.Platform.MacOS, 1.2.0"
                    
#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 Bathos.Platform.MacOS@1.2.0
                    
#: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=Bathos.Platform.MacOS&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Bathos.Platform.MacOS&version=1.2.0
                    
Install as a Cake Tool

Native platform abstractions for .NET

NuGet Native validation Codecov

Common .NET interfaces for native OS operations: atomic file publication, file inspection and leases, desktop integration, screen color sampling, installed color profiles, native paths, and standard directories.

Choose the providers your application needs, compose them explicitly, and pass focused capability interfaces to the components that use them. The libraries have no UI toolkit or dependency injection container dependencies. Linux icon rendering uses system imaging libraries. Your application owns its UI loop, application targets, and storage policy.

.NET 10 · MIT license. All four packages share a version and follow Semantic Versioning. Linux implementations remain experimental; their public APIs have the same compatibility commitment, and the Linux package follows the same stable/prerelease channel as the other packages.

Capabilities

Capability Windows macOS Linux
Atomic file publication and rename Available Available Available
Snapshot replacement with retained readers Available Available Available
Regular-file inspection Available Available Available
Native paths and file URIs Available Available Available
Standard directories and application scoping Available Available Available
Cooperative shared/exclusive file leases Available Available Available
File-manager reveal Explorer Finder FileManager1 service
Application handoff and native lookup Executable / App Paths Executable / app bundle Executable / desktop entry
System-default file opening Shell open LaunchServices GIO default activation
Application icons Native RGBA Native RGBA RGBA; native libraries required
File-driven application discovery Shell registrations NSWorkspace file lookup GIO content-type registrations
Screen color sampling Host dispatcher Host dispatcher Portal opt-in
Installed color profiles Available Available Unavailable

Availability describes the built-in implementations. Native operations require the matching OS and may require filesystem support, desktop services, or permissions. A null capability means unsupported or unconfigured; a null screen sample means user cancellation. Operation failures remain distinct. Linux's experimental status applies throughout the table.

See platform support and prerequisites before deployment, including headless Linux use, native library requirements, and the limits of the tested configurations.

Packages

Install only the providers you intend to support. Each provider depends on the core package and the .NET runtime; the core is included transitively.

Packages contain net10.0 libraries, XML API documentation, this README, and MIT license text. Portable PDB symbols are published as .snupkg files. Native OS frameworks and Linux system libraries come from the host. Engineering harnesses and test applications are not shipped.

Get started

In a .NET 10 console project, install all three providers for the cross-platform example below. These commands select the latest stable packages:

dotnet add package Bathos.Platform.Windows
dotnet add package Bathos.Platform.MacOS
dotnet add package Bathos.Platform.Linux

Write a complete file to private staging, then publish it under the first available name:

using Bathos.Platform;
using Bathos.Platform.Files;
using Bathos.Platform.Linux;
using Bathos.Platform.MacOS;
using Bathos.Platform.Windows;

var platform = PlatformProviders.SelectCurrent(
    new WindowsPlatformProvider(), new MacOSPlatformProvider(), new LinuxPlatformProvider());
var rename = platform.FileRename ?? throw new PlatformNotSupportedException("Native publication is unavailable.");
await using var publication = new FilePublication(Path.GetFullPath("published-files"), rename);
await publication.Stream.WriteAsync("Hello from .NET!\n"u8.ToArray());
var path = await publication.PublishAsync(new GeneratedFileName("Greeting", ".txt"), CancellationToken.None);
Console.WriteLine(path); // Greeting.txt, Greeting (2).txt, ...; existing files are preserved.

Disposal removes abandoned staging; a published file survives disposal. PublishExactAsync supports an exact filename and explicitly authorized replacement. Publication requires a native rename and does not fall back to cross-volume copying. Atomic visibility does not guarantee survival of a power failure. See the publication recipes for streaming, snapshot replacement, and ownership.

Documentation and support

The README and guides describe the source revision being viewed. Use the matching source tag or shipped XML documentation for an older installed package. Package README links point to their release snapshot. Stable public API contracts cover callers and implementers within a major version; new capabilities are optional, and breaking contract changes require a new major version.

For source development, install the SDK pinned in global.json and Node.js with npm as described in Contributing, then run task check. Task is optional; equivalent commands are listed there.

Copyright © 2026 Bathos Pty Ltd.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 203 11/9/2026
1.2.0-rc.1 57 11/9/2026
1.2.0-beta.1 62 11/9/2026
1.1.0 249 10/25/2026
1.1.0-rc.1 71 10/25/2026
1.1.0-beta.2 72 10/25/2026
1.1.0-beta.1 77 10/24/2026
1.0.0 216 10/23/2026
0.1.0-beta.1 86 10/22/2026