Closed MaxDZ8 closed 3 years ago
Hey, thanks for the kind words!
As you've discovered, FlatBufferSerializer
doesn't exist in the packages you've referenced. FlatBufferSerializer
is the runtime serializer for people who just use attributes and not fbs files (in effect, the FlatSharp.Compiler
package invokes FlatBufferSerializer
at build time so you don't have to carry all of those dependencies).
Assuming your fbs file has some table with fs_serializer
set, you can just do SomeType.Serializer
to access the type's serializer. This sample should help. Let me know if you have more questions!
I forgot about that detail.
I still have a question however: shall I do a PR updating this info into the wiki? It seems to me this should be mentioned with emphasis.
Sure -- I'm open to all contributions. I should make a pass through the wiki and link to relevant samples from those wiki pages.
Closing this now; feel free to open a PR to address any oversights in the wiki. Thanks again for using FlatSharp!
Hello, thank you for your efforts. I am sold on this library and I'm using it. I am having difficulty running the build-time FBS schema conversion.
According to wiki, my project would only need to reference
FlatSharp.Compiler
andFlatSharp.Runtime
. My .csproj is kinda like this:It looks quite close to me but if I build from Visual studio:
The same happens if I try
dotnet build
(the messages are localized but that's it).I originally used Visual Studio 2019 16.8.2 but I figured it might have been a version issue so I updated to 16.9.4. It made no difference.
I tried fiddling with it. It seems adding the
FlatSharp
package fixes the issue, likely due to the depandancyMicrosoft.CodeAnalysis.CSharp.Workspaces
but that makes me slightly uncomfortable as the dependancies make it to publish.I'm trying to convince I can live with the extra files, the amount of storage isn't much of a big deal. Is this as intended?