philipp2604.LiteUa 1.3.0

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

LiteUa 🔗

Language License GitHub issues

LiteUa is a native, lightweight, and dependency-free OPC UA Client Library written entirely in C# from scratch.

Unlike other libraries that wrap the official OPC Foundation .NET Stack (which imposes GPL licensing constraints) or commercial SDKs, LiteUa implements the OPC UA binary protocol directly on top of TCP. This makes it extremely fast, lean, and permissive-license friendly.

⚠️ Work In Progress (WIP)

This library is currently in an early development stage. While the core functionality (Secure Connection, Read/Write, Subscriptions) is implemented and tested, it does not yet cover the entire 1000+ page OPC UA specification. Use with caution in production environments.

🚀 Why LiteUa?

  • Zero 3rd Party Dependencies: The core library is built directly on System.Net.Sockets and System.Buffers. No dependency on the official OPC Foundation Stack. No GPL viral licensing issues.
  • Pure C#: Fully managed code without native wrappers.
  • High Performance: Features a built-in UaClientPool for request-heavy scenarios.
  • Resilient: Includes a SubscriptionClient with automatic reconnection and self-healing capabilities.
  • Tested: Everything is tested using integration tests against Siemens S7-1200 (modeled OPC Server interface) and S7-1500 controllers (standard Simatic OPC Server interface).

📦 Dependencies & Licenses

While the LiteUa core library is strictly dependency-free to ensure ease of licensing, the Test Projects utilize external packages (e.g., xUnit, Microsoft.NET.Test.Sdk) to ensure code quality and protocol correctness.

For a full list of dependencies used in the test environment, please refer to: 📄 THIRD-PARTY-PACKAGES.md

✨ Implemented Features

LiteUa covers the most important features required for HMI/SCADA and IoT connectivity:

🔐 Security & Connectivity

  • OPC UA TCP Transport: Efficient Chunking and Message handling.
  • Secure Channel: Support for Sign and SignAndEncrypt.
  • Policies: Full implementation of Basic256Sha256 (RSA-OAEP, AES-CBC, HMAC-SHA256).
  • Authentication: Anonymous and UserName (including encrypted password transmission).
  • Certificate Management: Handling of X.509 Certificates and Server Signature validation.

📡 Core Services

  • Read / Write: Support for Scalars, Arrays, and complex Structures (UDTs).
  • Browse: Recursive browsing with Bulk support and automatic Paging (ContinuationPoints).
  • Method Calls: Call methods directly on the server with typed argument mapping.
  • Subscriptions: Monitoring of data changes (DataChangeNotification) with KeepAlive logic.

🛠 Architecture

  • Type Registry: Dynamic decoding of custom structures (ExtensionObjects) without code generation.
  • Connection Pool: Thread-safe pooling for high-throughput transactional operations.
  • Async/Await: Fully asynchronous API design supporting CancellationTokens.

🚧 Limitations / Roadmap

The following features are not (yet) implemented:

  • Events & Alarms (EventNotificationList).
  • History Access (HDA).
  • Complex Discovery Services (GDS).
  • XML Encoding (only Binary is supported).
  • Other Security Policies / Algorithms than Basic256Sha256.

📦 Architecture

The library is split into logical layers:

  1. Builtin: OPC Type definitions (Variant, DataValue, NodeId).
  2. Client: Client classes for data access, pooling and subscriptions.
  3. Encoding: Classes for binary encoding and decoding.
  4. Security: Everything security related (policies, certificate factory, ...).
  5. Stack: Implementation of the OPC UA stack / services.
  6. Transport: The underlying TCP connection logic.

🤝 Contributing

Contributions are welcome! Since this is a "from scratch" implementation, please ensure any PRs maintain the zero-dependency philosophy for the main library.

⚖️ License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

You are free to use, modify, and distribute this software in commercial and private applications.


Built with ❤️ and a lot of reverse engineering.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.
  • net10.0

    • No dependencies.
  • net9.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.

Version Downloads Last Updated
1.3.0 129 2/4/2026
1.2.3 122 2/4/2026
1.2.2 117 2/4/2026
1.2.1 118 2/3/2026
1.2.0 123 2/3/2026
1.1.0 125 1/28/2026
1.0.0 120 1/20/2026