OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.89k stars 926 forks source link

Do not remove support for .NET Standard 2.0 until really necessary #2559

Closed OPCLabs closed 3 months ago

OPCLabs commented 3 months ago

Type of issue

Current Behavior

It came to my attention that the support for .NET Standard 2.0 might be removed from this project soon.

I have a library built on top of UA-.NETStandard, and also an accompanying project that has a bunch of Roslyn analyzers. Consequently, the Roslyn analyzers need to reference UA-.NETStandard. The Roslyn analyzers must target .NET Standard 2.0 for them to be universally usable (see https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix ). If support for .NET Standard 2.0 was removed from UA-.NETStandard, I would not be able to build the Roslyn analyzers anymore.

Expected Behavior

Keep the .NET Standard 2.0 targeting as long as technically feasible. Note that, at least for my usage, there is actually no need for the real "OPC UA" code to run correctly (connections etc.). All that is needed is the ability to keep referencing UA-.NETStandard in projects that are targeting .NET Standard 2.0.

Steps To Reproduce

No response

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

No response

mregen commented 3 months ago

Hi @OPCLabs , in order to build the analyzers, would it be sufficient to provide the Opc.Ua.Core library with netstandard2.0 support only? The concern is somebody can ship an app using client/server only with the netstandard2.0 libraries, which have some known limitations. But if only Core is needed, there is no risk that backward compatibility must be maintained. Otherwise we need to maintain the client/server code for netstandard2.0.

OPCLabs commented 3 months ago

Hi @mregen. If just Opc.Ua.Core library is kept with netstandard2.0, I would still need to restructure the solution significantly in order to get rid of the other package(s) for the purpose of building analyzers - because I also use the other packages. But, perhaps with just Opc.Ua.Core kept with netstandard2.0, the effort needed for the restructure would be lower. So unless you can/are willing to keep netstandard2.0 in other packages as well, keeping it in Opc.Ua.Core is at least a help.