camunda-community-hub / zeebe-client-csharp

Contains an Zeebe C# client implementation.
https://camunda-community-hub.github.io/zeebe-client-csharp/
Apache License 2.0
99 stars 53 forks source link

Add back support for .Net Standard 2.0 #712

Closed ionutcalin1977 closed 2 months ago

ionutcalin1977 commented 2 months ago

Is your feature request related to a problem? Please describe. At my place of work we need to offer support of zeebe client in multiple .Net Framework apps and services.

Describe the solution you'd like Add netstandard2.0 in the target frameworks of Client.csproj Now is like this

net6.0;net7.0;net8.0

should be like this

net6.0;net7.0;net8.0;netstandard2.0

Describe alternatives you've considered We can fork this project and add the support by ourselves, but this is not a desired solution as it would mean to constantly look for changes and merge them into our clone.

Additional context I've check and all the dependent libraries that this project references have netstandard2.0 support, so there is no issue with this.

ChrisKujawa commented 2 months ago

Hey,

I had time to look into this, sorry for the delay.

I think right now it is not possible to support it. I finally also remember why we removed it, we migrated the worker implementation to use dataflow Api and this is not supported .net standard. We can't compile against these.

zeebe-client-csharp/Client/Impl/Worker/JobWorker.cs(20,30): error CS0234: The type or namespace name 'Dataflow' does not exist in the namespace 'System.Threading.Tasks' (are you missing an assembly reference?) [zeebe-client-csharp/Client/Client.csproj::TargetFramework=netstandard2.1]
zeebe-client-csharp/Client/Impl/Worker/JobWorker.cs(125,17): error CS0246: The type or namespace name 'ExecutionDataflowBlockOptions' could not be found (are you missing a using directive or an assembly reference?) [zeebe-client-csharp/Client/Client.csproj::TargetFramework=netstandard2.1]
zeebe-client-csharp/Client/Impl/Worker/JobWorker.cs(135,24): error CS0246: The type or namespace name 'DataflowBlockOptions' could not be found (are you missing a using directive or an assembly reference?) [zeebe-client-csharp/Client/Client.csproj::TargetFramework=netstandard2.1]
...

I don't plan to invest here more, in rewriting the worker again.

What you could do:

  1. generate your own client via grpc
  2. use an old client or use the rest API
  3. At some point I might migrate the client to the rest API and then I might touch the worker again, but i cant say when this will happen.

With that I'm closing this ticket, sorry that I can't support you here.