❔ 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
amio
amio2y ago
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?
canton7
canton72y ago
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 ...
Accord
Accord2y ago
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.