I am following this C# Quickstart tutorial for gRPC. I have come to this step where I have to use the following command to generate gRPC code:
%UserProfile%\.nuget\packages\Grpc.Tools.1.15.0\tools\windows_x86\protoc.exe -I../../protos --csharp_out Greeter --grpc_out Greeter ../../protos/helloworld.proto --plugin=protoc-gen-grpc=%UserProfile%\.nuget\packages\packages\Grpc.Tools.1.15.0\tools\windows_x86\grpc_csharp_plugin.exe
It doesn't work and what I get in the terminal after running commands above is this:
--grpc_out: protoc-gen-grpc: The system cannot find the path specified.
I don't know why the system cannot find the path since I have changed the path in the command so that it points to the files which need to be executed.
Can you try passing an absolute path to --plugin=protoc-gen-grpc=
?
I considered the answer by Michael. However, using a different user account was not an option and I couldn't rename my user account since it's an Azure AD user and as such does not have an entry in the Windows list of local users where I would change its folder location in the registry.
The work-around that did it for me was to change the location of the global packages folder.
I ran into the same problem, and with this error "path not found" and your name containing special characters as well, I suspected an issue with non ASCII paths! It happened that my windows username had a special character "ë" in it
You should create a github issue, but here are some quick fixes:
I had the same error because had cyrillyc symbols in my user folder. Solved by changing path to global nuget packages in nuget file config (for Windows: %appdata%\NuGet\NuGet.config
):
<configuration>
<config>
<add key="globalPackagesFolder" value="D:\.nuget\packages" />
</config>
</configuration>
Instead of D:\.nuget\packages
you can set any path without wrong symbols
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With