Add empty service definitions to placeholder proto

Grpc.Tools needs service definitions to generate the base classes
(CommandService+CommandServiceBase, etc.) that GrpcGenerator looks for.
Without these, the service bases wouldn't exist on first build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
David Nguyen 2026-01-22 02:21:43 -05:00
parent dfbef9d161
commit 05449b9a28
Signed by: david.nguyen
GPG Key ID: D5FB5A5715829326

View File

@ -87,8 +87,18 @@ option csharp_namespace = ""{grpcNamespace}"";
package cqrs; package cqrs;
// Placeholder proto file - will be regenerated on next build // Placeholder proto file - will be regenerated on next build with actual services
// Using namespace: {grpcNamespace} // Using namespace: {grpcNamespace}
// Empty service definitions so Grpc.Tools generates base classes
service CommandService {{
}}
service QueryService {{
}}
service DynamicQueryService {{
}}
"; ";
var placeholderOutputPath = Path.Combine(ProjectDirectory, OutputDirectory); var placeholderOutputPath = Path.Combine(ProjectDirectory, OutputDirectory);
Directory.CreateDirectory(placeholderOutputPath); Directory.CreateDirectory(placeholderOutputPath);