Here's the problem I'm trying to solve:
- I have some
*.protofiles I'm generating using the<ProtoBufMSBuild task fromGrpc.Tools. - To the best of my knowledge, this neither supports generating nullable references code nor just putting
#nullable disableat the top of the file. - But the project I want to include them in has
Nullableenabled.
This will produce a bunch of classes where the compiler will treat the references as being non-nullable when they are, in fact, nullable. So I'm trying to come up with ways of dealing with this. Just to complicate things, this is a prototype that may be replicated across many projects, so I'm looking for as simple a solution as possible.
A separate project isn't particularly desirable, so I'm trying to find ways that I could mark the target directory as not being nullable enabled. So, is there a way to set the directive for a folder?