Opc.Classic 0.1.0-alpha

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

Opc - "A modern classic"

Build Docker test fleet .NET 10 License: MIT

A cross-platform, NativeAOT-compatible .NET 10 implementation of OPC Classic for clients and servers. Managed DCOM/MSRPC with no Windows COM runtime interop, XML-DA over HTTP, source-generated proxies and dispatchers, and self-contained NTLMv2 / Kerberos / SPNEGO authentication.

Status — release candidate.

What you get

  • Cross-platform OPC Classic — DA (1.0 / 2.05a / 3.0), AE 1.10, HDA 1.20, Batch 2.00, Commands, Complex Data, DX, Security, and XML-DA over HTTP. Runs on Windows, Linux, and macOS (.NET 10). No call to native OS code other than what .net provides.
  • Managed DCOM/MSRPC stack — full MS-DCOM PDU framing, NDR marshaling, OBJREF/ORPC, packet integrity + privacy, channel binding (RFC 5056/5929). No [ComImport], no Windows COM runtime dependency.
  • Self-contained authentication — NTLMv2, Kerberos (RC4-HMAC + AES128/256), SPNEGO with mechListMIC, channel binding tokens. Cryptography (MD4, RC4) ships in-tree with RFC test vectors; MD5 / HMAC / DES / AES come from the BCL.
  • Source-generated proxies and dispatchers — Roslyn IIncrementalGenerator emits a client proxy and a server dispatcher for every OPC interface marked [OpcInterface]. No reflection at runtime; AOT-clean and trim-safe.
  • Windows COM-callable wrappers — when running on Windows, SCM-activated servers are exposed through raw-vtable CCWs (also [ComImport]-free). Full release-scope vtables cover DA server/group/item/sync/async I/O/connection-point paths, AE server/subscription array-heavy methods, and HDA server/read/update/advise/playback paths.
  • NativeAOT + trimming compatible across every runtime project, enforced by IsAotCompatible, EnableTrimAnalyzer, EnableAotAnalyzer, and an explicit BannedSymbols.txt.
  • Validation baseline — 0 build warnings, 0 build errors, and all test projects green, including DA, AE, HDA, DCOM, crypto, Kerberos, SMB, integration, MCP, discovery, generators, property-based, snapshot, XML-DA, and more.

Quick start

Install the Opc.Classic SDK package (it bundles the full cross-platform runtime — client and managed server), then consume the managed contracts from the Opc.Classic.* namespaces:

dotnet add package Opc.Classic --prerelease

On Windows, also add Opc.Classic.Windows to host a server through DCOM. The full granular per-spec packages (Opc.Classic.Da, Opc.Classic.Ae, …) remain available on the GitHub Packages feed — see docs/RELEASE_PROCESS.md.

using Opc.Classic.Da;

static async Task ReadOneAsync(IDaServer server, CancellationToken cancellationToken = default)
{
    IReadOnlyList<ItemValueResult> values = await server.ReadAsync(
    [
        new Item("Random.Int1") { ClientHandle = 1 },
    ], cancellationToken);

    ItemValueResult value = values[0];
    Console.WriteLine($"{value.ItemName} = {value.Value} ({value.Quality}) @ {value.Timestamp:O}");
}

Walk through the first DA client tutorial for an end-to-end example, or browse the adoption guide for hosting + deployment patterns.

Repository layout

Path What's inside
src Runtime assemblies, source generators, shared build props, central package versions, and the AOT/trim ban list.
tests TUnit projects on Microsoft.Testing.Platform: primitives, transports, auth, generators, codecs, hosting, discovery, integration matrices, MCP integration (Opc.Classic.Mcp.Integration.Tests), property-based, snapshot, and crypto.
samples/ Runnable apps — DA/AE/HDA servers and clients, a loopback demo, an additional managed DA sample (CttServer), the OPC Security sample server, a full-feature simulation server (all specs + MCP, DA/AE/HDA TCP hosting, and SimulationActivationServer/SimulationActivationHost cold activation returning OBJREF_STANDARD), and a NativeAOT canary.
docs/ Documentation hub: architecture, adoption, tutorials, cookbook, migration analyzer, security, conformance, roadmap, and architecture diagrams.
Docker test fleet Windows Docker test fleet — managed-server image, C-built native server/client images, OPC Foundation TestServer/TestClient images, and the docker-compose.
interop/ OPC Foundation conformance assets: vendored IDL headers, CMake-built native sample servers/test apps, and helper scripts.
.github Build, Docker test fleet, and release workflows.

Samples

The runnable apps under samples/ include DA/AE/HDA managed servers and clients, an in-process loopback, an additional managed DA sample (CttServer), the OPC Security sample server, a full-feature simulation server (every OPC Classic spec behind one MCP server, with DA/AE/HDA over TCP and SimulationActivationServer/SimulationActivationHost cold activation returning OBJREF_STANDARD), and a NativeAOT canary. See the samples README for the map, run instructions, env-var conventions, and sample-container deployment.

Documentation

Start with the documentation hub. Common entry points:

  • Architecture overview — the managed DCOM stack from the listener through dispatchers.
  • Adoption guide — host a server, consume a client, deploy on Windows/Linux.
  • Tutorials — step-by-step walkthroughs for DA, AE, HDA, AOT, troubleshooting.
  • Cookbook — task-flavored recipes (Linux to Matrikon, Kerberos in AD, DCOM hardening, OPC Security, etc.).
  • Spec coverage — what's implemented per OPC sub-spec.
  • Security — STRIDE threat model, channel binding, NTLMSSP audit guide.
  • Migration analyzer — diagnostics for porting from the legacy .NET Framework OPC API.
  • MCP integration — using Opc.Classic from VS Code Copilot, Cursor, Claude Desktop, Copilot CLI.
  • Docker test fleet — the multi-container Windows interop test setup.
  • Roadmap — forward-looking gates and gaps.
  • Changelog — release-by-release detail.

Build from source

Requires the .NET 10 SDK pinned by global.json:

dotnet restore Opc.Classic.slnx
dotnet build Opc.Classic.slnx
dotnet test Opc.Classic.slnx

Targeted test subsets:

# DA only
dotnet test tests\Opc.Classic.Da.Tests --no-build

# Solution-wide minus Windows-only and platform-blocked categories
dotnet test Opc.Classic.slnx --filter "Category!=NativeConformance&Category!=MatrikonConformance"

NativeAOT publish (used by CI to verify trim + AOT cleanliness):

dotnet publish samples\Opc.Classic.Samples.AotCanary -c Release -p:PublishAot=true -p:TreatWarningsAsErrors=true

The expected baseline at every commit on master: 0 build warnings, 0 build errors, every test project green.

Contributing and license

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request, and report security issues through SECURITY.md.

Opc.Classic is licensed under the MIT License. The interop/ tree retains upstream OPC Foundation sample, redistributable, and reference-asset license terms; see THIRD-PARTY-NOTICES.md for the full attribution list.

Opc.Classic is an independent implementation. It is not endorsed by, affiliated with, or certified by the OPC Foundation. OPC, OPC Classic, OPC DA, OPC AE, OPC HDA, OPC UA and related marks are trademarks of the OPC Foundation. Use of those marks here refers only to the published specifications this codebase implements.

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 (1)

Showing the top 1 NuGet packages that depend on Opc.Classic:

Package Downloads
Opc.Classic.Windows

Windows DCOM server-hosting add-on for the Opc.Classic SDK. Bundles Opc.Classic.Hosting.Windows (COM registration/activation) so a managed Opc.Classic server can be exposed as a real Windows DCOM server. Depends on the Opc.Classic package for the shared runtime assemblies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha 37 7/9/2026