55 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 f3d3fd87d3 Reorganize Stack/ folder layout (#3775)
Two refactors that together reshape how the stack tier is laid out:

1. Rename `Opc.Ua` project to `Opc.Ua.Core.Types`

   * Stack/Opc.Ua/ -> Stack/Opc.Ua.Core.Types/ (git mv preserves history)
   * Opc.Ua.csproj -> Opc.Ua.Core.Types.csproj
   * AssemblyName  : `Opc.Ua` -> `Opc.Ua.Core.Types`
   * PackageId     : `OPCFoundation.NetStandard.Opc.Ua` ->
                     `OPCFoundation.NetStandard.Opc.Ua.Core.Types`
   * RootNamespace : kept as `Opc.Ua`
   * StackGeneration.cs assembly-name switch updated; the renamed
     assembly still produces `StackGenerationType.Models`.
   * The `OPCFoundation.NetStandard.Opc.Ua` name now belongs solely to
     the roll-up meta-package (nuget/Opc.Ua.nuspec); the meta-package's
     former self-dependency is replaced with the new
     `.Core.Types` package, and `.Symbols.nuspec` gains the
     matching `.Core.Types.Debug` debug-symbol dependency.

2. Move `Opc.Ua.Security.Certificates` from Libraries/ to Stack/

   It is a stack-tier dependency consumed by Opc.Ua.Core, not a
   higher-level library extension, so it now sits alongside the other
   stack projects.

Both refactors update the same set of cross-cutting infrastructure:
- UA.slnx, UA Core Library.slnx, Applications/ConsoleReferenceServer/Dockerfile
- .azurepipelines/signlist{Debug,Release}.txt
- ProjectReferences across Stack/, Libraries/, Tests/, Fuzzing/
- Tests/Opc.Ua.SourceGeneration.Stack.Tests/StackGenerationAssemblyTests.cs
- Docs/PlatformBuild.md and .github/copilot-instructions.md (new
  Core.Types package listed)

Verification
* dotnet build UA.slnx -c Debug -- succeeded, 0 errors
* StackGenerationAssemblyTests       :    5 passed
* Opc.Ua.SourceGeneration.Tests      :   40 passed
* Opc.Ua.SourceGeneration.Core.Tests : 3514 passed,  8 skipped
* Opc.Ua.Core.Tests (Stack filter)   : 1982 passed, 80 skipped
* Opc.Ua.Security.Certificates.Tests :  239 passed
2026-05-18 05:49:36 +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
Martin Regen 48d64b530c Remove https package from OPCFoundation.NetStandard.Opc.Ua dependencies to avoid build issues. (#2751)
instead manually add the https package for server support, if needed.
2024-09-06 12:36:11 +02:00
romanett fb0fc44796 Add Readme to NuSpec (#2580) 2024-04-10 07:07:15 +02:00
Martin Regen 2b9d8f9de5 Fix warnings, no functional changes. Improve globalization. (#2445)
Fix warnings regarding localization, CLS compliance, performance. No functional changes.

Many but not all adressed:
CA1859
CA1868
CA1305
CA1310
CA1861

- based on the discussion, use IFormatProvider where appropriate in ToString
2024-02-14 17:17:21 +01:00
Martin Regen cc09a561d1 Update Nuget license information (#1764)
The OPC Foundation Technical Control Board on March 30th decided on the following changes with regard to the license information in the published Nuget packages:

•	Replace the “Redistributables” license for OPC UA Nuget packages with the Dual License.
•	Change the dual license in the source files so that “members” are replaced with “corporate members”. (see #1763)

Effectively, 
- Nuget packages from libraries provided as samples which only build from source code which is covered by a MIT license, are the directly tagged with the MIT license.
- Nuget packages which build from source code where the headers imply the dual license applies, are tagged with the Dual License  'LICENSE.txt' found in the repository root.
2022-03-31 15:42:51 +02:00
Martin Regen 0011f482a0 Use FrameworkReference for kestrel package for .NET Core App >= 3.1 (#1646)
- Kestrel server is end of life for .NET Core 2.1, only support for .NET framework and netstandard2.0
- Use FrameworkReference to include ASPNET services for .NET Core 3.x and later
- adjust the code signing for bindings.https
- deprecate complextypes.symbols package

- note: only netcoreapp3.1 and net6.0 frameworks yet support latest kestrel and allow to use MS.Ext.Logging library >=5.x with bindings.https. If netstandard2.0 or net462 is used, the Microsoft.Extensions.Logging library >= 3.x cause a TypeException in Microsoft...HttpHeader because a required class became obsolete in Platform.Extensions.
2021-12-23 18:35:20 +01:00
Martin Regen 631e729787 Fix warnings, improve complex type exception handler (#1384)
- catch exception in complex type system not only for ServiceResultException
- add fast path for single type loader if type already exists
- fix many warnings, no function change
- fix template for legacy nuget packages to include cert lib
2021-04-28 18:34:43 +02:00
Martin Regen 62eedc19be Reduce core dependencies, move https binding to optional assembly. (#1157)
* implement transport binding factory
* split https transport into seperate nuget package
* new Opc.Ua.Binding.Https assembly
* Https binding is loaded on demand, if available
* reduce core dependencies to kestrel and others
fixes #600
2020-10-21 00:03:37 +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
Martin Regen 38c37acd8f Add support for netstandard2.1 in core libs and nuget packages (#1110)
- solutions support still VS2017 and VS 2019
- ci now also tests net462 & netcoreapp3.1
- next rev of nuget packages will have netstandard2.1 support
- a few small fixes for netcoreapp3.1
2020-09-04 22:56:20 +02:00
dependabot[bot] 4492a3520a Bump System.Reflection.Emit from 4.6.0 to 4.7.0 (#1037)
* Bump System.Reflection.Emit from 4.6.0 to 4.7.0

Bumps [System.Reflection.Emit](https://github.com/dotnet/corefx) from 4.6.0 to 4.7.0.
- [Release notes](https://github.com/dotnet/corefx/releases)
- [Commits](https://github.com/dotnet/corefx/commits)

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

* Bump Portable.BouncyCastle from 1.8.4 to 1.8.6.7

Bumps [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp) from 1.8.4 to 1.8.6.7.
- [Release notes](https://github.com/novotnyllc/bc-csharp/releases)
- [Commits](https://github.com/novotnyllc/bc-csharp/compare/pcl-v1.8.4...pcl-v1.8.6.7)

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

* Bump Newtonsoft.Json from 10.0.3 to 12.0.3

Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 10.0.3 to 12.0.3.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/10.0.3...12.0.3)

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

* update nuget spec

* address https://www.whitesourcesoftware.com/vulnerability-database/CVE-2019-0548

* add dependency and fix typo

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Regen <mregen@microsoft.com>
2020-07-07 15:59:21 +02:00
AlinMoldovean d5fb3b5f4a Update .nuspec files 2020-06-15 15:52:41 +03:00
Alexander Köpke 3e61a85901 Update from .NET 4.6 to .NET 4.6.2 (#959)
Upgraded all project from .NET 4.6 to .NET 4.6.2 that also .NET framework applications can use latest version of Kestrel

* Updated Kestrel to 2.2.0 (for Opc.Ua.Core)
* Simplified csproj (removed ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'") because currently we don't build netstandard1.x anymore
* Removed Kestrel 1.1.3 code from Stack/Opc.Ua.Core/Stack/Https/HttpsListener.cs 
* add conditions to Stack/Opc.Ua.Core/Stack/Https/HttpsTransportChannel.cs 
  * [HttpClientHandler.ServerCertificateCustomValidationCallback](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.servercertificatecustomvalidationcallback?view=netcore-3.1&viewFallbackFrom=netframework-4.6.2) should not be available in .NET 4.6.X
* Updated travis.ci to use latest mono version (original version causes build errors)
* Added nuget reference .NET Standard Library to mono projects to be compatible with latest Kestrel version

Own Travis.ci and Azure Pipeline builds run sucessfully.
2020-05-01 09:57:15 +02:00
Alin Moldovean 81832f71a3 Update UA-Nodesets and generated code (#925)
* Update generated code and UA-nodeset files for 1.04.5 Errata

* Update UA-Nodeset files and generated code of Sample projects with latest version of ModelCompiler
2020-03-20 14:43:25 +02:00
Martin Regen a1faa0f7a1 Remove netstandard1.3 (#887)
* remove netstandard1.3 and unify csproj settings
* switch tests to silent mode
2020-01-23 07:22:26 +01:00
Martin Regen f7ab80d304 Update kestrel nuget version (#882)
* update kestrel nuget version
* update nuspec
2020-01-10 12:28:23 +01:00
Martin Regen de9872320c Fixtravis & nuget auto dependency (#857)
- urgent commit to test nuget build system
2019-11-21 19:58:05 +01:00
Martin Regen 39dca2c103 Complex Types client library (#849)
Adds a complex type system client library extension for custom enumerations and structure types based on a server dictionary or DataTypeDefinition using emitted classes at runtime. 

- Custom types are added to the session factory, not to the global factory. Types are loaded when the session connects by adding 
`                var complexTypeSystem = new ComplexTypeSystem(session);
                await complexTypeSystem.Load();
`
- Custom type properties can be accessed with an accessor [propertyname] or [index]. Direct access through the properties is possible, but some cases do not update the optional or union flags correctly.
- Support includes V1.03 dictionaries and V1.04 DataTypeDefinitions (--> known issues).
- NetCoreComplexClient can be used for quick testing servers. It prints out all custom types with content and subscribes to all. Also includes sample how to write back complex type variables and how to output JSON.
- The UA Sample Client and the Quickstart Data Type client can be used for testing with UI. Many issues were adressed to be able to read and write complex types, however some support is limited, e.g. only editing simple fields is currently working (help wanted).
- Caveat: The complex type libaries for .Net Core must be built for .netcoreapp, so it needs a seperate nuget package for the complex type client extension.
- Support for a factory type builder class to allow to plugin other type builder methods (e.g. Codedom etc...)
- Added JSON test case and include the complex types client in the testing shell script, so the complex types lib is tested on mac/linux too.
- Few fixes in the JSON encoder.

Finding enough servers with custom types is an issue, so if you find servers with unsupported custom types please provide feedback.

Known limitations:
- Only V1.03 OPC binary dictionaries are supported (no XML Schema dictionaries).
- V1.03 dictionary structure definitions are only supported if they can be mapped to a V1.04 DataTypeDefinition. Nested types and cross dictionary refs should work.
- OptionSet is only partially implemented. Only shows the byte arrays, not the flags.
- Opaque Types in dictionaries are ignored.
2019-11-20 16:05:24 +01:00
Martin Regen 2e3fcb331b update bouncy castle version to 1.8..4. (#588) 2018-11-13 11:14:05 +01:00
Martin Regen 6ef3b7bbc5 follow guidance of CVE-2018-8356 and Microsoft Security Advisory 4021279 2018-07-31 14:51:20 +02:00
Martin Regen ced33e1957 Improvements for cloud based Gds and V1.04 nodes (#508)
- all changes for cloud based GDS
 - build version of .net standard libs is now set in version.props, it may require updates for the official builds.
  - add new stuff for v1.04 nodeset, e.g. QueryApplications Api
  - gds.client/gds.server common dll changes to support a cloud based GDS.
2018-07-31 13:32:21 +02:00
Martin Regen e6916f31be License info in V1.04 is not quite right (#503)
* Use OPC REDISTRIBUTABLES Agreement of Use in nuget packages (#424)

* Security policy Basic128Rsa15 removed from default server configurations.
2018-07-17 17:31:59 +03:00
AlinMoldovean 49fb32fdce Assembly version set to 1.04.353 2018-05-03 15:11:48 +03:00
AlinMoldovean 27ff681320 Assembly version set to 1.03.352 2018-03-29 16:23:01 +03:00
AlinMoldovean 11c7248df4 Fix in nuspec files for case sensitive "version" attribute. 2018-03-29 14:59:58 +03:00
Martin Regen e2a4020984 Fix V103 nohttps build (#401)
- Fix the NO_HTTPS build to reduce publish size if HTTPS is not needed
e.g. `dotnet build /p:NoHttps=true`
- Limit language Version to C#6 for VS 2015 compat
- add travis & appveyor cases for nohttps build
- enable GDS Https transport
- update nuspec
2018-03-16 10:21:32 +01:00
Martin Regen 4d05093462 Clean up nuget dependencies (#353)
- remove dependency on System.Private.ServiceModel, it should not be used directly
- remove packages.config, VS2017 doesn't need it
- use ref to .Net instead of nuget to reduce number of packages used
2018-02-16 19:14:12 +01:00
Martin Regen e21f99eaf6 Fixes for https client and server (#346)
* Fixes for https client and server (#38)

HTTPS server fixes:
- Kestrel 2.0 in netcoreapp 2.0 server samples: only responds to some clients, not to UA samples at all. Fix configuration (listen to all ip addresses) 

HTTPS client fixes:

- bug: client gets stuck if subscription is active by nesting too many calls (use async callback)
- https client needs server cert in a trusted store or it refuses connection (auto accept server certs, but fix is not supported on all platforms, e.g. UWP apps still require a cert in the trusted store)
- runtime issues with .Net 4.6. apps (cannot find diagnostics dll) --> workaround is to manually add nuget package of System.Net.http 4.3.3

- Add https connection to travis test script (only .Net Core)

* fix shell script exe

* also listen on ipv6 port

* do not use auto validation on OSX
2018-02-08 13:58:07 +01:00
Martin Regen 59879eb7bc Update Nuget package version 2018-01-15 11:43:33 +01:00
AlinMoldovean 9dd62478ca Version number set to 1.03.350 in AssemblyVersion and Nuspec files 2017-12-06 17:23:07 +02:00
Martin Regen d850f64f81 Support .netstandard2.0 (#237)
* add missing ref for build in VSO hosted VS 2017 build

* project to just build Dlls

* target multiple frameworks

* switch to net46/netstandard1.3

* fix projects to allow for netcoreapp 2.0 build

* fix networking for .Net Core 2.0:
SendAsync and ReceiveAsync now frequently return synchronously even if successful. These cases had not been properly handled yet, previous versions never hit these codepaths.

* fix travis build / nugets

* change travis build target

* fix Kestrel https option for netstandard 2.0
tested with Ua Expert against standard and ref server

* Handle special case correctly, when zero bytes are received its ok, or BadTimeout will occur

* simplify connect, reduce DiscoverEndpoint calls
2017-09-15 09:37:32 +02:00
Martin Regen 3daebe9105 new nuget package structure 2017-07-07 15:22:24 +02:00
Erich Barnstedt 223de61e7d Revved Nuget package version. 2017-05-19 17:20:36 +02:00
Erich Barnstedt 8bff2dc732 Revved Nuspec package version only. 2017-05-17 08:42:54 +02:00
Erich Barnstedt 3cfcd9e361 Revved NuGet package version and a small bug fix. 2017-03-22 14:45:34 +01:00
Erich Barnstedt 9fb49f7730 Remove persist keyset flag from directory cert store as it doesn't make sense (we always store .pfx files) and rev nuget package numbers. 2017-03-09 00:01:27 +01:00
Erich Barnstedt 5abfa6e981 Updated nuspec version info only. 2017-03-02 08:43:44 +01:00
Erich Barnstedt 07577df2fc Update NuSpec versioning only. 2017-02-27 13:32:41 +01:00
Martin Regen a472722e43 bump nuget to 0.1.8 2017-02-24 15:26:39 +01:00
Marc Schier 8b71b38268 Access to IMessageSocket from Session, plus fix for BeginConnect indefinite blocking (#139)
Access to IMessageSocket from Session, plus fix for BeginConnect indefinite blocking
2017-02-22 15:08:25 +00:00
Martin Regen 44f3ae2dff bump up nuget to 0.1.6 2017-02-20 11:22:27 +01:00
Martin Regen d3d7f14eb6 bump up nuget to 0.1.5 2017-02-06 09:51:27 +01:00
Martin Regen e90287d16f Nuget 0.1.1 update
helper for testing new nuget packages with local package source
2017-01-17 10:16:53 +01:00
Erich Barnstedt 848bb20e92 Updated nuget packages only. 2016-12-20 08:50:30 +01:00
Erich Barnstedt 1fd605cd54 Updated nuget packages versioning. 2016-12-09 09:50:00 +01:00
Erich Barnstedt f8f3e14d44 Updated NuGet packages only. 2016-12-05 13:43:06 +01:00
Erich Barnstedt 3f854f0e55 Updated licensing info only. 2016-11-10 09:11:09 +01:00