AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Type or namespace Api does not exist in 'Google'

Open Leonardo-Ferreira opened this issue 1 year ago • 5 comments

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?!?

image


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Leonardo-Ferreira avatar Aug 25 '23 19:08 Leonardo-Ferreira

@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

wadepickett avatar Aug 25 '23 20:08 wadepickett

.Net 7 (SDK 7.0.10) and Visual Studio for Mac version 17.6.3 (build 421)

Leonardo-Ferreira avatar Aug 25 '23 20:08 Leonardo-Ferreira

Any news @wadepickett?

Leonardo-Ferreira avatar Sep 01 '23 22:09 Leonardo-Ferreira

@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.

vishm avatar Dec 02 '23 11:12 vishm

in my dotnet 8 client application, I have added NuGet Google.Api.Gax.Grpc and it resolved this compilation error.

zeecorleone avatar May 11 '24 05:05 zeecorleone