C# generated code for Protobuf map<string, string> is failing #3527
Closed
maxipaolucci
started this conversation in
General
Replies: 1 comment 4 replies
-
Hi @maxipaolucci, thanks for raising an issue. This code is generated by |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello team,
I have the following Protobuf schema
Generated the C# classes using
buf generate
When I try to use the generated class
Meta.cs
in my .NET 6.0 project I am getting the following error/Users/maxi.paolucci/Workspace/sdk.horizon-dotnet-examples/examples/Xero.Eventing.Horizon.SDK.Net6.ProducerSample/Confluent/Protobuf/Meta.cs(246,15): error CS1061: 'MapField<string, string>' does not contain a definition for 'MergeFrom' and no accessible extension method 'MergeFrom' accepting a first argument of type 'MapField<string, string>' could be found (are you missing a using directive or an assembly reference?) [/Users/maxi.paolucci/Workspace/sdk.horizon-dotnet-examples/examples/Xero.Eventing.Horizon.SDK.Net6.ProducerSample/Xero.Eventing.Horizon.SDK.Net6.ProducerSample.csproj]
I had been able to manually edit that file and replace that line 246 and do something like this as a work around and it worked
But ideally we don't want to have to manually update these classes as they are generated by some automated process.
Any idea if this could be a bug in the buf libs?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions