Skip to content

Conversation

@CalvinAllen
Copy link
Contributor

Summary

Fixes the issue where native gRPC assemblies appeared as linked items in Solution Explorer when installing the package.

The previous approach (PR #32) added a .targets file to hide the items, but this didn't work because the files were being packaged as contentFiles within the Otel4Vsix package itself.

This fix removes the gRPC native files from the package during dotnet pack using a Target that runs before GenerateNuspec. The files will still be available at runtime through the transitive Grpc.Core dependency.

Files excluded:

  • grpc_csharp_ext.x64.dll
  • grpc_csharp_ext.x86.dll
  • libgrpc_csharp_ext.x64.dylib
  • libgrpc_csharp_ext.x64.so

Test plan

  • Build and pack the project
  • Verify no gRPC native files in the resulting .nupkg
  • Install package in a VSIX project
  • Verify no linked gRPC files appear in Solution Explorer
  • Verify OTLP/gRPC export still works at runtime

Native gRPC assemblies (grpc_csharp_ext.*.dll, libgrpc_csharp_ext.*) were being
packaged as contentFiles, causing them to appear as linked items in Solution
Explorer when consuming the package.

These files are still needed at runtime but should flow through transitively
from the Grpc.Core dependency rather than being bundled in this package.
@CalvinAllen CalvinAllen merged commit 92c216f into main Jan 6, 2026
3 checks passed
@CalvinAllen CalvinAllen deleted the fix/exclude-grpc-native-from-pack branch January 6, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants