I've been burnt by this a few times when setting up a project and think I've found the cause. If I add a class or record to a class without a namespace and annotate it it won't generate any output for that class. Once it's in a namespace (explicit or file scoped) it seems to work fine.
Always seems to stump me a for a while when setting up a new project then magically resolves itself a little farther in the process.
Ninja edit: I'm using dotnet-typegen generate to do the actual generation.