C# - No intellisense in VS 2019 for Mac

18 views
Skip to first unread message

mik...@gmail.com

unread,
Jul 10, 2019, 4:11:06 PM7/10/19
to grpc.io
Hello,

I am developing an application using GRPC in .NET Core 3 (Preview) and it is very difficult to develop the service implementations because I have no intellisense. The using statements are not resolving either. I have verified Grpc.Tools is generating the source code in /obj/debug and the application does compile fine, but the IDE is not including these generated files are part of its source files.

My csproj item group looks like this:

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore.Server" Version="0.1.21-pre1" />
<PackageReference Include="Google.Protobuf" Version="3.8.0" />
<Protobuf Include="Grpc\Protos\*.proto" GrpcServices="Server" />
<Content Include="@(Protobuf)" LinkBase="" />
<PackageReference Include="Grpc.Tools" Version="1.22.0" PrivateAssets="All" />
</ItemGroup>

I have the same issue with all the demo applications I've downloaded, and even the GRPC Template. I am wondering if it's an issue with just the Mac version of VS 2019 or am I missing something?

Thanks in advance.
-Mike


Jan Tattermusch

unread,
Jul 15, 2019, 10:27:12 AM7/15/19
to mik...@gmail.com, grpc.io
Hello,

I had a similar problem (VS Code intellisense not working when using .NET Core 3 preview). I think it boils down to the omnisharp's .NET core version being different to the .NET core version of your project. Feel free to post the solution if you resolve it.

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d7f1aace-6a2f-4643-b9a5-01e1401a068f%40googlegroups.com.


--

Jan

Jan Tattermusch

unread,
Jul 15, 2019, 10:28:30 AM7/15/19
to mik...@gmail.com, grpc.io
For VS on windows, you need to launch using this script: https://github.com/grpc/grpc-dotnet/blob/master/startvs.cmd Perhaps a similar trick would be needed for VS for Mac.
--

Jan

Message has been deleted

mik...@gmail.com

unread,
Jul 15, 2019, 10:38:21 AM7/15/19
to grpc.io
I got it working on VS 2019 for Mac by adding this to my csproj file.

  <Target Name="Protobuf_Compile_Before_AssemblyReferences" BeforeTargets="ResolveAssemblyReferences">
    <CallTarget Targets="_Protobuf_Compile_BeforeCsCompile" />
  </Target>

This solution did not work for .net standard libraries though, only .net core 3 targets.
Reply all
Reply to author
Forward
0 new messages