Installation
Installation
Install the Client Package
The simplest way to get started is to install the top-level client package:
dotnet add package OpcSharp.ClientThis pulls in all layers of the stack.
Individual Packages
If you only need specific layers, reference them directly:
| Package | Purpose |
|---|---|
OpcSharp.Types | Core types: NodeId, StatusCode, DataValue, Variant |
OpcSharp.Encoding | Binary encoder/decoder for all OPC UA types |
OpcSharp.Transport | TCP transport, Hello/ACK, chunking |
OpcSharp.Transport.Http | HTTPS/WebSocket transport |
OpcSharp.Security | Security policies, crypto, certificates |
OpcSharp.Protocol | Session and SecureChannel management |
OpcSharp.Services | Service wrappers (Attribute, Browse, Method, etc.) |
dotnet add package OpcSharp.Types
dotnet add package OpcSharp.Encoding
dotnet add package OpcSharp.Transport
dotnet add package OpcSharp.Transport.Http
dotnet add package OpcSharp.Security
dotnet add package OpcSharp.Protocol
dotnet add package OpcSharp.ServicesTarget Frameworks
OpcSharp targets multiple frameworks:
- netstandard2.0 — broadest compatibility (.NET Framework 4.6.1+, .NET Core 2.0+, Mono, Xamarin)
- net8.0 — LTS release with ECC security policy support and certificate generation
- net9.0 — current release
- net10.0 — preview support
Features like ECC security policies and self-signed certificate generation require net8.0 or later.
Build from Source
git clone https://github.com/patdhlk/OpcSharp.git
cd OpcSharp
dotnet build OpcSharp.sln
dotnet test OpcSharp.sln