Hi,
a few days ago I started experimenting with grpc.
I have followed a tutorial online, and decided to play with it.
I have setup a project to compile my proto file, and it contains server and client code.
To make things as simple as possible, I have *only* added this single proto file, and compiled it. No Problem.
Until I got to look at ncrunch which seems to have difficulty compiling the project.
Here's the project:
Quote:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="GreeterService.proto" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="GreeterService.proto" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.18.0" />
<PackageReference Include="Grpc" Version="2.44.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.43.0" />
<PackageReference Include="Grpc.Tools" Version="2.44.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
And here's the single proto file: (GreeterService.proto)
Quote:
syntax = "proto3";
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply);
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
NCrunch gives the following feedback:
Could not make proto path relative (0, 0): GreeterService.proto: No such file or directory
Could you find why ncrunch gives me that feedback ? Am I doing something wrong ?
Thx,
Dirk