❔ AdditionalText to Bytes or stream
I am writing a generator, I have binary file format, how can I read it's bytes from
AdditionalText
class? Or I am forced to abandon binary format and use JSON?3 Replies
There's not enough info here. What do you mean, AdditionalText? What format? What generator? Are you serializing something into a binary format, or reading one?
It's a long-standing issue: https://github.com/dotnet/roslyn/issues/47292
GitHub
Source generators can't access binary files · Issue #47292 · dotnet...
As far as I can see, source generators only have access to files specified as AdditionalFiles. However, this means that binary files can't be used for generating code. Adding a binary file ...
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.