This OPC UA reference implementation is targeting the .NET Standard specification.
.NET Standard allows to develop apps that run on all common platforms available today, including Linux, iOS, Android (via Xamarin) and Windows 7/8/8.1/10/11 (including embedded/IoT editions) without requiring platform-specific modifications.
One of the reference implementations inside this project has been certified for compliance through an OPC Foundation Certification Test Lab to prove its high quality. Fixes and enhancements since the certification process have been tested and verified for compliance using the latest Compliance Test Tool (CTT).
Furthermore, cloud applications and services (such as ASP.NET, DNX, Azure Websites, Azure Webjobs, Azure Nano Server and Azure Service Fabric) are also supported.
More samples based on the official Nuget packages can be found in the OPC UA .NET Standard Samples repository. For development there is also a preview Nuget feed available. For local testing a Docker container of the Reference Server is available for preview and release builds.
For more information and license terms, see here.
- Fully ported Core OPC UA Stack and Libraries (Client, Server, Configuration, Complex Types & GDS assemblies).
- Reference sample Server and Client.
- X.509 Certificate support for client and server authentication.
- SHA-2 support (up to SHA512) including security profile Basic256Sha256, Aes128Sha256RsaOaep and Aes256Sha256RsaPss for configurations with high security needs.
- Anonymous, username and X.509 certificate user authentication.
- UA-TCP & HTTPS transports (client and server).
- Reverse Connect for the UA-TCP transport (client and server).
- Folder & OS-level (X509Store) Certificate Stores with Global Discovery Server and Server Push support.
- Sessions and Subscriptions.
- A PubSub library with samples.
- Improved support for Logging with
ILogger
andEventSource
. - Support for custom certificate stores with refactored
ICertificateStore
andCertificateStoreType
interface. - Client and Server support for TransferSubscriptions.
- How to use Container support with reference server.
- OPC UA Reference Server and Reference Client for .NET Framework.
- OPC UA Console Reference Server for .NET Core. A Linux Container of the latest builds is available here. See also Container support.
- The OPC UA Reference Server has been certified for compliance through an OPC Foundation Certification Test Lab. Fixes and enhancements since the certification process have been tested and verified for compliance using the Compliance Test Tool (CTT). All releases are verified for compliance with the latest official Compliance Test Tool by the maintainers.
- OPC UA Console Reference Publisher and Console Reference Subscriber for .NET Core and .NET Framework.
- An official OPC UA Nuget package of the core, client, server and configuration libraries is available for integration in .NET projects. Note: The package has been split into Core, Client and Server packages to reduce the dependencies in projects where only client or server is needed. The https binding is now a seperate optional package.
- A preview Nuget feed is available from Azure Devops.
All the tools you need for .NET Standard come with the .NET Core tools. See Get started with .NET Core for what you need.
Note: Since .NET Core 2.1 is end of life,
- VS 2017 has only limited support for .NET 4.8.
- VS 2019 has only limited support for .NET 4.8 because .NET Core 3.1 reached end of life.
- VS 2022 is the current supported version, including .NET 6.0 (LTS) and .NET 8.0 (LTS).
- Open the UA Reference.sln solution file using Visual Studio.
- Choose a project in the Solution Explorer and set it with a right click as
Startup Project
. - Hit
F5
to build and execute the sample.
This section describes how to run the ConsoleReferenceServer sample application.
Please follow instructions in this article to setup the dotnet command line environment for your platform. As of today .NET Core SDK 3.1 is required for Visual Studio 2019 and .NET SDK 6.0 is required for Visual Studio 2022.
- Once the
dotnet
command is available, navigate to the root folder in your local copy of the repository and executedotnet restore 'UA Reference.sln'
. This command calls into NuGet to restore the tree of dependencies.
- Open a command prompt.
- Navigate to the folder Applications/ConsoleReferenceServer.
- To run the server sample type
dotnet run --project ConsoleReferenceServer.csproj -a
.- The server is now running and waiting for connections.
All required application certificates for OPC UA are created at the first start of each application in a directory or OS-level certificate store and remain in use until deleted from the store. Please read Certificates for more information about certificates and stores
By default all sample applications are configured to register with a Local Discovery Server (LDS). A reference implementation of a LDS for Windows can be downloaded here. To setup trust with the LDS the certificates need to be exchanged or registration will fail.
We strongly encourage community participation and contribution to this project. First, please fork the repository and commit your changes there. Once happy with your changes you can generate a 'pull request'.
You must agree to the contributor license agreement before we can accept your changes. The CLA and "I AGREE" button is automatically displayed when you perform the pull request. You can preview CLA here.