-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import "google/api/annotations.proto" was not found or had errors #879
Comments
You need to have a copies of a couple of proto files in your project. I've updated the instructions: http://james.newtonking.com/archive/2020/03/31/introducing-grpc-http-api |
@JamesNK I followed the instructions and in my .Net project I still have build errors: Error Import "google/api/annotations.proto" was not found or had errors. I have the google files in a google\api directory in my project |
I found in VS 2019 Preview and in the gRPC HTTP API sample that I needed to include the google The most effective way I've found to do this is:
|
@mfc19 I've have the same issue, did you find a solution ? |
Hi, I just wanna add my two cents in here, it might help others in future. I'm new to building a gRPC client within an ASP.NET backend app (using
<PackageReference Include="Google.Api.CommonProtos" Version="2.15.0" GeneratePathProperty="true" />
<PackageReference Include="Google.Protobuf" Version="3.27.3" />
<PackageReference Include="Grpc.Tools" Version="2.65.0" PrivateAssets="All" />
<Protobuf ProtoRoot="Proto" Include="Proto/**/*.proto" GrpcServices="Client" AdditionalImportDirs="$(PkgGoogle_Api_CommonProtos)/content/protos"/>
Et voilà! 🎉 |
I followed the three steps in your blog but I am getting above error.
What else do I have to do to make the dependencies available?
The text was updated successfully, but these errors were encountered: