So I guess all latest Mac users now have this issue. I have created a dotnet grpc project using the in-built template. The nuget packages don't support the M* architecture and it definitely tries to use the x86 version. Now, it is possible to use the latest grpc.tools via brew (which supports M*) by swapping out in the package using symlinks. The issue though is that I'm not actually sure which variant of grpc is being targeted by the brew version. In the templated example, a greet.proto is provided. If I protoc (using the brew version) the resultant .cs file is not compatible with the rest of the example codebase. I suspect that is targeting the deprecated c# support rather than the newer dotnet-grpc?
Any information provided would be good! Thanks, Phillip On Tuesday, June 13, 2023 at 12:10:06 PM UTC+1 Игорь Букач wrote: > softwareupdate --install-rosetta > > суббота, 27 мая 2023 г. в 15:05:01 UTC+3, JulianDev: > >> Hey Guys, >> >> Im trying to use gRPC for C# on my Macbook M1 with Rider. >> >> Currently I have this error. >> >> Google.Protobuf.Tools.targets(292, 5): [MSB6003] The specified task >> executable >> "/Users/julian/.nuget/packages/grpc.tools/2.53.0/tools/macosx_x64/protoc" >> could not be run. System.ComponentModel.Win32Exception (86): An error >> occurred trying to start process >> '/Users/julian/.nuget/packages/grpc.tools/2.53.0/tools/macosx_x64/protoc' >> with working directory '/GrpcService1'. Bad CPU type in executable >> at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo >> startInfo, String resolvedFilename, String[] argv, String[] envp, String >> cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] >> groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean >> usesTerminal, Boolean throwOnNoExec) >> at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) >> at System.Diagnostics.Process.Start() >> at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, >> String responseFileCommands, String commandLineCommands) >> at Microsoft.Build.Utilities.ToolTask.Execute() >> >> Is there any way to change it so I can use the protoc and >> grpc_csharp_plugin I installed via brew? >> I tried setting environment variables and then tried to build it with >> dotnet build, that worked, but still no code was generated which can be >> used in C#. >> >> Kind regards :) >> > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/ca7d48f7-5bff-4489-8e60-99c12e0253f6n%40googlegroups.com.