`google/protobuf/go_features.proto : error : File not found` when generating C# code
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 836
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 7
Description
I have a .proto file starting with:
```proto
edition = "2023";
import "google/protobuf/go_features.proto";
option features.(pb.go).api_level = API_OPAQUE;
option go_package = "...";
option csharp_namespace = "...";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
message Message {
...
}
```
When trying to generate C# gRPC code for this proto file I get an error message:
```
google/protobuf/go_features.proto : error : File not found. [/.../....csproj]
proto/proto.proto(3,1): error : Import "google/protobuf/go_features.proto" was not found or had errors. [/.../....csproj]
```
Compiling protobuf files that don't import go_features.proto seems to work fine.
Contributor guide
Research direction
Start with proto/proto.proto and the .csproj configuration, then inspect how the C# gRPC generator resolves imported Google protobuf files. Compare the failing google/protobuf/go_features.proto import with the working struct.proto and timestamp.proto imports; done means C# generation succeeds for the shown proto without the file-not-found errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100