© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•5w ago•
1 reply
Blaze

Reference other files in Protobuf

otherintermediaterider
I've got the following structure:

Project
-> Protos
     -> Types
            -> Vector3.proto
     TestMessage.proto
Project
-> Protos
     -> Types
            -> Vector3.proto
     TestMessage.proto


Vector3.proto
Vector3.proto

syntax = "proto3";

option csharp_namespace = "gRPCTest.Types";

package greet.types;

message Vector3 {
    float x = 1;
    float y = 2;
    float z = 3;
}
syntax = "proto3";

option csharp_namespace = "gRPCTest.Types";

package greet.types;

message Vector3 {
    float x = 1;
    float y = 2;
    float z = 3;
}

TestMessage.proto
TestMessage.proto

syntax = "proto3";

option csharp_namespace = "gRPCTest.Types";

package greet.types;

message Vector3 {
    Vector3 position = 1;
}
syntax = "proto3";

option csharp_namespace = "gRPCTest.Types";

package greet.types;

message Vector3 {
    Vector3 position = 1;
}


Project.csproj
Project.csproj
protobuf part
<ItemGroup>
  <Protobuf Include="Protos\TestMessage.proto" ProtoRoot="Protos" GrpcServices="Server" />
  <Protobuf Include="Protos\Types\Vector3.proto" ProtoRoot="Protos" GrpcServices="Server" />
</ItemGroup>
<ItemGroup>
  <Protobuf Include="Protos\TestMessage.proto" ProtoRoot="Protos" GrpcServices="Server" />
  <Protobuf Include="Protos\Types\Vector3.proto" ProtoRoot="Protos" GrpcServices="Server" />
</ItemGroup>


The TestMessage proto cannot import the Vector3 message, rider suggests to import it from the correct location, but does nothing when Alt+Enter but clicking on the autompletion puts
types.Vector3
types.Vector3
which isnt found (attachments)
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ protobuf not generating proto files
C#CC# / help
4y ago
Storing protobuf in the database
C#CC# / help
7mo ago
❔ Source generator & protobuf
C#CC# / help
4y ago
❔ ProtoBuf cannot find imports
C#CC# / help
4y ago