From 05449b9a28bc2fa5a93a32fcf1b50cd1746e8ba7 Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Thu, 22 Jan 2026 02:21:43 -0500 Subject: [PATCH] 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 --- Svrnty.CQRS.Grpc.Generators/WriteProtoFileTask.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Svrnty.CQRS.Grpc.Generators/WriteProtoFileTask.cs b/Svrnty.CQRS.Grpc.Generators/WriteProtoFileTask.cs index 455999b..3650f86 100644 --- a/Svrnty.CQRS.Grpc.Generators/WriteProtoFileTask.cs +++ b/Svrnty.CQRS.Grpc.Generators/WriteProtoFileTask.cs @@ -87,8 +87,18 @@ option csharp_namespace = ""{grpcNamespace}""; 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} + +// Empty service definitions so Grpc.Tools generates base classes +service CommandService {{ +}} + +service QueryService {{ +}} + +service DynamicQueryService {{ +}} "; var placeholderOutputPath = Path.Combine(ProjectDirectory, OutputDirectory); Directory.CreateDirectory(placeholderOutputPath);