26 Commits

Author SHA1 Message Date
Marc Schier 8d2402c995 Bump version to 2.0 and land 1.5.378 to 2.0 migration guide (#3819)
Prepares the repository for a 2.0 release: bumps every version reference
from 1.6 to 2.0, and lands the migration guide describing the 1.5.378 →
2.0 upgrade path. The 1.6 line never shipped, so this is a straight
rename with no historical 1.6 migration content to preserve.

The PR is split into two commits:

1. **`Bump version to 2.0 (next release is a major version change)`** —
version metadata, NuGet metadata, the side documentation, and the
migration agent file.
2. **`[Docs] Close 19 audit gaps in 1.5.378 to 2.0 migration guide`** —
adds and reorganizes `Docs/MigrationGuide.md` to close every gap from a
rigorous code-review audit of the 1.5.378 → 2.0 breaking-change surface.

### Version bump (commit 1)

- `version.json`: `1.6-preview` → `2.0-preview`
- `common.props`: `<VersionPrefix>1.6</VersionPrefix>` →
`<VersionPrefix>2.0</VersionPrefix>`
- `nuget/Opc.Ua.nuspec` and `nuget/Opc.Ua.Symbols.nuspec`: `1.6.0` →
`2.0.0`
- `README.md`: "New in 1.6" → "New in 2.0"
- `Docs/ComplexTypes.md`, `Docs/Observability.md`, `Docs/Sessions.md`:
1.6 → 2.0 mentions
- Renames `.github/agents/opcua-v16-migration.agent.md` →
`.github/agents/opcua-v20-migration.agent.md` and updates the agent
metadata (name, description, trigger phrases, version table)
- `UA.slnx`: solution-items reference updated to the new agent filename
-
`Tools/Opc.Ua.SourceGeneration.Core/Generators/ObjectTypeProxyGenerator.cs`:
two v16 → v20 comment fixes

### Migration guide (commit 2)

Closes 19 gaps from an audit comparing `master378` (1.5.378) with
`master` (2.0). Adds a new top-level **Package, Target Framework and
Dependency Changes** section covering the new `Opc.Ua.Core.Types` and
`Opc.Ua.Security.Certificates` packages, the `LibTypesTargetFrameworks`
netstandard2.0 drop, the NuGet dependency additions/removals, and the
residual Newtonsoft.Json dependency in `Opc.Ua.PubSub`.

In-place additions:

- new H4 for `INodeManager3` under Node States
- `Session.Call` `Variant.From` worked example
- new H3 `Subscriptions and Transports` with H4 verdicts for Durable
subscriptions (source-breaking), PubSub (no source break) and Reverse
connect (no source break)
- new H3 `Telemetry and Logging` covering `ITelemetryContext`
constructor-injection patterns
- `in DataValue` async copy-to-local pattern
- UNSAFE / SAFE pair for `WithPoolNotifications` pooling
- using-alias example for classic vs V2 `SubscriptionOptions`
- "Silent regression" callout for `OnAfterCreate`
- numbered lifecycle ordering for
`ApplicationConfiguration.CertificateManager`

Corrections:

- clarifies that the `SessionReconnectHandler` `[Obsolete]` is still
present in 2.0 (not withdrawn);
- clarifies that the source-generated `ServerCapability` constants vs
the `ServerCapabilityInfo` registry type are distinct;
- disambiguates `ReconnectPolicyOptions` (DTO) from `ReconnectPolicy`
(runtime).

Adds an "Automate the migration" pointer to the forthcoming
`Opc.Ua.CodeFixers` analyzer package, which mechanizes 17 of the
patterns covered in this guide. The analyzer is published in a follow-up
PR.
2026-05-29 08:18:41 +02:00
Marc Schier 79cb229834 Move version to 1.6 and enable preview build (#3575) 2026-02-21 21:34:19 +01:00
Marc Schier 712e770fbe Restructure core and built in types into base assembly and nuget (#3326)
This change adds a **new Opc.Ua.Types** nuget that contains core types that do not rely on generated code.  Why the name?  Because almost all code that was in the Types subfolder is part of it, and because we do not want to change the name of the Opc.Ua.Core nuget/assembly because code relies on it.  Any other name like base or bootstrap felt out of place due to the current structure already defining the name "types".  Key design is to depend on only a small set of libraries with limited transitive dependencies, that includes hashcode, logging.abstraction, and for non standard20 builds System.Text.Json (needed for localizedText mul parsing).  Also, key is to support .netstd 2.0 to support source generators and to allow removal of EEC_SUPPORT defines by removing std2.0 from core and all libraries.

The changes are mostly restructuring, and thus small but contain some key changes:

- **Status code** struct now comes with a Symbol field, which is used to carry symbols in case the code is not generated.  Currently (until generated) the status code struct must be manually created with a symbol or the ToSymbolicId extension must be called in the core project.  Future will generate Status code constants just like NodeId that contain the symbol which also removes the reflection-based lookup.  Several tests needed to be adjusted as they checked the status code symbol strings instead of the code.
- **Core identifiers** are copied as they were needed for code to compile, that includes attributes, a subset of status codes and node identifiers.  These will never change so no need to generate them.
- The types folder now contains **encoders**, except for json which is still in core.  Once the json encoder is ported to system.text.json it will also be included and Newtonsoft.Json dropped as dependency (-> #3329).  
- Since types relies on **IOperationContext** and **ISystemContext**, and these export IUserIdentity which relies on crypto, these were split and extended in core with ISessionOperationContext and ISessionSystemContext, which mean changes to ServerSystemContext and introduction of SessionOperationContext and SessionSystemContext classes that extend OperationContext and SystemContext.  Some runtime checks in the server are therefore needed to get at the session and auth info, however, those are anyway optional fields and are not on the critical paths, and thus a type check is in order (and was done in the past already, but against OperationContext class).
- **Manifest resources** are now split between Core (nodeset zip, some generated resoures) and Types (built in bsd/xsds).  This needs to be revisited later if the bsd/xsd need to be regenerated during type generation.  Note that the embedded resource names changed as a result. Since these are only used internally and do not constitute public API this feels reasonable vs duplication of resources in 2 assemblies.
- Reflection however now needs to load not just the built in **encodeables** from Opc.Ua.Types assembly, but also the generated encodeables from Opc.Ua.Core assembly.  For this a new helper Utils method was added to get the Core assembly when linked against Opc.Ua.Core otherwise null.
- Whatever utils methods needed to be split out into the new Opc.Ua.Types assembly, they are now in **CoreUtils** static class in Opc.Ua.Types, and Utils.xxxx forwards to them to ensure minimal changes.  Later we would want to obsolete them in favor of CoreUtils, although it might make sense to split them again into domain specific utilities, such as networking, files, etc
2025-11-10 19:33:24 +01:00
romanett 85d1ddec50 Set Version 1.5.377 / Increase DurableSubscriptionTest Session Timeout (#3163)
* Set Version & increase DurableSubscriptionTest Session Timeout

* increase timeout even more
2025-08-18 16:53:51 +02:00
dependabot[bot] 6bbe07c742 Bump BouncyCastle.Cryptography and Microsoft.NETFramework.ReferenceAssemblies (#3034)
* Bump BouncyCastle.Cryptography and Microsoft.NETFramework.ReferenceAssemblies

Bumps [BouncyCastle.Cryptography](https://github.com/bcgit/bc-csharp) and [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet). These dependencies needed to be updated together.

Updates `BouncyCastle.Cryptography` from 2.5.0 to 2.5.1
- [Commits](https://github.com/bcgit/bc-csharp/compare/release-2.5.0...release-2.5.1)

Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3
- [Commits](https://github.com/Microsoft/dotnet/commits)

---
updated-dependencies:
- dependency-name: BouncyCastle.Cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* increase version height offset to 200

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Roman Ettlinger <romanett98@gmail.com>
2025-03-12 20:37:36 +02:00
romanett ef9387b525 Enable Durable Subscriptions (#2978)
* Enable Durable Subscriptions (#9)

* [Server] Durable Subscriptions (#2683)

* Implement a system test for DurableSubscriptions (#2839)
* Client Side
Co-authored-by: ALTERNATE-DEV\Archie <archie@dreamsandadventures.ca>

* make a static Method CalculateRevisedQueueSize

* Adress review feedback

* fix FilterRetainTests

* Add MonitoredItem Id to Queues
Use NodeIdDictionary where possible
2025-02-28 13:46:49 +02:00
Martin Regen 5ed73fcd95 merge latest release 2024-12-07 17:30:58 +01:00
Martin Regen b3b2f9154e Update version.json to allow preview builds from develop (#2813) 2024-10-26 09:39:04 +02:00
dependabot[bot] f433fa414d Bump Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Abstractions and System.Diagnostics.DiagnosticSource (#2796)
* Bump Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Abstractions and System.Diagnostics.DiagnosticSource

Bumps [Microsoft.Extensions.Logging](https://github.com/dotnet/runtime), [Microsoft.Extensions.Logging.Abstractions](https://github.com/dotnet/runtime) and [System.Diagnostics.DiagnosticSource](https://github.com/dotnet/runtime). These dependencies needed to be updated together.

Updates `Microsoft.Extensions.Logging` from 6.0.0 to 8.0.1
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v6.0.0...v8.0.1)

Updates `Microsoft.Extensions.Logging.Abstractions` from 3.1.32 to 8.0.2
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/commits/v8.0.2)

Updates `System.Diagnostics.DiagnosticSource` from 6.0.1 to 8.0.1
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v6.0.1...v8.0.1)

---
updated-dependencies:
- dependency-name: Microsoft.Extensions.Logging
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.Logging.Abstractions
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: System.Diagnostics.DiagnosticSource
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update version.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-17 19:12:03 +02:00
Suciu Mircea Adrian f001eabcc8 Add support for ECC profiles (#2398)
- Port support for ECC NIST/Brainpool profiles from prototyping_ecc branch
- Implement CertProvider to load certs per connection / profile
- Backward compatibility of configuration for existing apps
- SecurityConfiguration specifies app cert types for each profile
- Autodetect the ECC support for brainpool/nist based on platform (mac OS 10 doesn't support brainpool)
- ECC supported on net48 / net5.0 / net 6.0 / netstandard2.1
- ECC supported on windows / linux / macOS (brainpool not < macOS11)
- Self signed certs for each profile are created on start similar to RSA
- RSA only profiles are supported on .NET standard 2.0

Co-authored-by: Martin Regen <mregen@microsoft.com>
2024-10-17 16:02:20 +02:00
Martin Regen 4a66cc3385 Remove lock from IServiceMessageContext (#2532)
Reduce lock contention for encoders/decoders.

The IServiceMessageContext locks all properties without really a need, because assigning/reading int and objects is transaction safe.
2024-02-20 15:44:27 +01:00
Martin Regen 591ceb0614 fix UWP sample build (#2496) 2024-02-06 14:13:04 +02:00
opcfoundation-org 1e927dd502 1.05.03 release final (#2423)
* latest nodeset
2024-01-18 17:29:46 +01:00
Martin Regen 043a56c3f2 Deprecate .NET framework 4.6.2 support, sync with samples repo (#2165)
- Deprecate support for Nuget package support of .NET Framework 4.6.2
- Bump sample applications to 4.8
- update some copyright headers / supporting files (editorconfig etc.)
- fix a few warnings
- fix an issue with `SessionReconnectHandler`, in certain combination of reconnect period and exponential backoff the .NET sample app never reconnected.
2023-05-31 18:53:56 +02:00
Martin Regen 828cc2011d Update version.json to 372 (#2139) 2023-04-27 10:57:16 +02:00
Martin Regen dd78c0be93 Client perf updates for NodeCache and service call layer to batch Operation Limits. (#1876)
- Add methods to support to Read/Browse multiple nodes in session and NodeCache.
- Add methods to find references of multiple nodes in NodeCache.
- By default the client fetches the operation limits from the server.
- Add operation limit object to client config, settings are overwritten by server limits if server limits are smaller.
- Split client service calls if operation limits are exceeded with an override of the SessionClient. All sync/async service calls are implemented, but not the servcie calls using the Begin/End pattern.
2022-08-08 11:43:55 +02:00
Suciu Mircea Adrian 1d123da6a9 Bump to version to 1.4.370 (#1871) 2022-07-19 10:20:04 +02:00
Martin Regen 0085597be2 Bump version to 369 (#1767)
Prep master for next milestone
2022-04-01 13:28:05 +02:00
Martin Regen 5bcadf4a0f Remove .NET Core 2.1 support, bump up to 1.4.368 (#1645)
* remove .NET  Core 2.1 support
* remove netcoreapp2.1 task from devops pipeline
2021-12-21 08:58:41 +02:00
Martin Regen 24f90c410a Add interfaces IServiceMessageContext, IEncodeableFactory (#1407)
* use IServiceMessageContext instead of ServiceMessageContext across the board.
* same for IEncodeableFactory
2021-06-11 16:35:46 +02:00
opcfoundation-org 0f97945858 Modelcompiler updates, errata 1.04.9 nodeset (#1284)
- Use updated Modelcompiler code generator to produce code which has no dependency on System.Servicemodel
- breaking change, .NET stack which used the NET_STANDARD version have to fix dependencies on System.Servicemodel
- new codegenerator also provides stubs for async client API (NET_STANDARD_ASYNC), currently disabled
- latest V1.04.9 Nodeset
2021-03-29 17:19:49 +02:00
Martin Regen f904139298 Refactor CertificateFactory, remove bouncy castle dependency in Opc.Ua.Core for .NET Core 3.1 (#1209)
- remove use of Bouncy Castle for .NET Core 3
- refactor CreateCertificate class to allow for an easier Create fluent model with respect to future extensions, e.g. ECC
- reimplement X509CRL and a couple of extension relevant for OPC UA based on the new System.Formats.Asn1 library
- use CertificateRequest on .NET Core 3.1
- refactor codebase to allow for a seperate library to handle all the ASN.1 encoding/decoding
- new package Opc.Ua.Security.Certificates with all ASN.1 encode/decode related code
breaking change: many  X509 related util functions were moved to X509Utils class
Note: .NET 4.6.2 and .NET Core 2.1 versions still use BouncyCastle for Cert creation
2020-12-13 18:17:54 +01:00
Martin Regen 9b8cf2eaf2 Push nuget as artifacts for release (#1143)
* upload pipelineartifacts for release pipeline and sign the symbol packages
* enable deterministic builds for snupkg source debugging
* allow release builds to be in release/x.y.z
* do not rename assemblies for debug builds, to allow for mixing of release and debug packages. Otherwise build issues may occure when packages are mixed.
2020-10-12 15:48:57 +02:00
AlinMoldovean dd12288482 Increase Nuget version 2020-10-08 11:15:33 +03:00
Martin Regen 089afbf28c Fix the license in the nuget packages (#1136)
- the license didn't show up!
- bump up the version offset, the preview feed already contains some higher versions which is confusing
2020-10-07 17:53:55 +02:00
Martin Regen 80a422136d Add Versioning and new nuget package structure to preview builds (#1130)
- use nerdbank.gitversioning to determine devops build version
- split nuget packages into new structure, one package per assembly to allow granular use of packages.
- also build .Debug versions
- back compat at least for a while, the old Opc.Ua packages reference also the new packages.
- devops produces preview builds for master
- preview builds are now signed, including nuget packages
- add license files for nuget packages, since licenseUrl is deprecated
2020-10-07 14:50:36 +02:00