gRPC Reusing protos between projects
So I currently have 2 projects within my solution, lets just call them
ServerP
(Console app)
ClientP
(.NET MAUI app)
I have got my proto definitions in the ServerP
project and everything is happy days with it, it compiles, recognises the compiled files etc...
The issue lies within ClientP
, although in the Solution Explorer I can see Protos/ping.proto
which is very simple:
In ClientP
, I've set the Stub Classes to Client, and in ServerP I have got it set to Server
Inside of ClientP.csproj
I have the following line
And inside of ServerP.csproj
I have the following:
However, in ClientP, it doesn't seem to recognise the namespace nor generate the files within the obj\Debug\net8.0-windows10.0.19041.0\win10-x64
path (I am developing a windows app)
Relevant NuGet Packages installed (ClientP):
- Grpc.AspNetCore 2.66.0
- Grpc.Net.Client 2.66.0
- Grpc.Tools 2.67.0
Relevant NuGet Packages installed (ServerP):
- Grpc.AspNetCore 2.66.0
- Grpc.Net.Client 2.66.0
- Grpc.Tools 2.67.0
(I also have other things for ServerP such as EF/Serilog/DI packages etc but didnt think they were relevant)
If any other information is required please do let me know.1 Reply
Sometimes the IDE thinks it can find it, and then when I go to compile it freaks out