google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library
https://flatbuffers.dev/
Apache License 2.0
22.52k stars 3.19k forks source link

[.NET] Add netstandard2.0 as target #8295

Closed bjornharrtell closed 1 month ago

bjornharrtell commented 2 months ago

ref https://github.com/google/flatbuffers/issues/8293

bjornharrtell commented 2 months ago

@ccorsano would you be willing to try this out in your scenario with .NET Source Generators?

ccorsano commented 2 months ago

@bjornharrtell I got your changes and was able to integrate the library with my source generator test project, it looks good to me.

My little experiment then fell short as my idea required file IO (to generate a bfbs schema then parse it), which, as I now learned is heavily discouraged (to not say forbidden) in source generators.

That being said, the alternative way of achieving my current goal is to write a custom MSBuild task, which has the same constraint of requiring netstandard2.0 (due to Visual Studio still running .Net Framework internally).

Overall netstandard2.0 is the last bridge to .Net Framework, so I still think it is a valuable target to keep.

bjornharrtell commented 2 months ago

Hmm.. a bridge to .NET Framework is something else which I'm not to keen on myself.

pavan709 commented 1 month ago

@bjornharrtell as UWP still uses the .netstandard 2.0, i am unable to install this.

bjornharrtell commented 1 month ago

@pavan709 assuming you mean you can't use flatbuffers without this change.

bjornharrtell commented 1 month ago

@dbaileychess are you willing to accept this?

pavan709 commented 1 month ago

yes @bjornharrtell without the support of .netstandard 2.0 it is not possible to install the flatbuffer in UWP, and UWP is widely used framework, .netstandard is not only a bridge to .net framework, rather .netstandard apis are used across the .net implementaions.

bjornharrtell commented 1 month ago

@pavan709 I'm aware of . net standard versions, but I was not aware of UWP. Anyway I support merge of this just need review to get in.

njannink commented 2 days ago

Any eta on a release?