Skyhighjinks
Skyhighjinks
CC#
Created by Skyhighjinks on 11/8/2024 in #help
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:
syntax = "proto3";

option csharp_namespace = "PProtos";

package ping;

service Pinger {
rpc PingServer (PingRequest) returns (PingReply);
}

message PingRequest {
string name = 1;
}

message PingReply {
int32 Itteration = 1;
}
syntax = "proto3";

option csharp_namespace = "PProtos";

package ping;

service Pinger {
rpc PingServer (PingRequest) returns (PingReply);
}

message PingRequest {
string name = 1;
}

message PingReply {
int32 Itteration = 1;
}
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
<ItemGroup>
<Protobuf Include="..\ServerP\Protos\ping.proto" Link="Protos\ping.proto" GrpcServices="Client" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="..\ServerP\Protos\ping.proto" Link="Protos\ping.proto" GrpcServices="Client" />
</ItemGroup>
And inside of ServerP.csproj I have the following:
<ItemGroup>
<Protobuf Include="Protos\ping.proto" GrpcServices="Server" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="Protos\ping.proto" GrpcServices="Server" />
</ItemGroup>
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.
2 replies
CC#
Created by Skyhighjinks on 5/8/2024 in #help
Xamarin blank screen
Hi Guys - I am using Xamarin.Forms to create a dynamically built app that will be built depending on the configuration within a database. However, when clicking a link which leaves the app and returning, then it becomes a blank screen. I am wondering if its possible to stop the page from being de-rendered or an easy way to save the current state of the app in memory and restoring it later
2 replies