You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Following these instructions, I'm trying to generate a native executable from my .NET Core assembly which has a dependency on Grpc.Core nuget. I hit the following issue:
dotnet publish -r win-x64
Microsoft.LocalForwarder.ConsoleHost.obj : error LNK2001: unresolved external symbol grpcsharp_auth_context_property_iterator [D:\Git\ApplicationInsights-LocalForwarder\src\ConsoleHost\ConsoleHost.csproj]
... same error message for every exported function from grpc_csharp_ext.x64.dll (see below)
Turns out Grpc.Core's assembly uses a native DLL called grpc_csharp_ext.x64.dll. They invoke it via DllImport, but there's also some sort of static dependency in the metadata. This is how ILSpy shows it:
I've never seen this, but I'm guessing this is the sort of reference that -linkresource option creates as described here.
Regardless, the question is - what's the best course of action here? Should I be able to compile such assembly into native code? How do I proceed to fix this?