AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Type or namespace Api does not exist in 'Google'
I did as instructed by im getting this error here, but, when compiling the solution I get the erro Error: The type or namespace name 'Api' does not exist in the namespace 'Google' (are you missing an assembly reference?)
any ideia of what im doing wrong?!?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 25375ca1-0ce8-a3ca-0c3a-446328f09ba1
- Version Independent ID: 25375ca1-0ce8-a3ca-0c3a-446328f09ba1
- Content: gRPC JSON transcoding in ASP.NET Core gRPC apps
- Content Source: aspnetcore/grpc/json-transcoding.md
- Product: aspnet-core
- Technology: aspnetcore-grpc
- GitHub Login: @JamesNK
- Microsoft Alias: jamesnk
@Leonardo-Ferreira, thanks for taking the time to relate your experience with the doc.
This issue is filed on the .NET 7 version of the topic. Were you working with .NET 7 and Visual Studio 2022, or was it actually .NET 8 Preview? (also available for this doc) I will test through them.
You can compare your project to the .NET 7 or .NET 8 samples for this tutorial, located here and look for a diff: https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/grpc/json-transcoding/sample
.Net 7 (SDK 7.0.10) and Visual Studio for Mac version 17.6.3 (build 421)
Any news @wadepickett?
@Leonardo-Ferreira Trust you found your solution - I hit this same issue when pulling out the Protos into a shared project. Once I added the NuGet package - "Google.Api.CommonProtos" all worked fine. Just adding this info here for other souls.
in my dotnet 8
client application, I have added NuGet Google.Api.Gax.Grpc and it resolved this compilation error.