The Grpc.Core.targets declare Content items for the purpose of copying to output directory of the files needed at run-time. These files should not be imported when packing, however, for example.
Since these items are imported without any metadata that distinguishes them from "regular" Content files added by a library/package author, it makes it difficult to exclude them without resorting to hardcoding their filenames in a target, which makes this workaround brittle if those ever change names, paths or new runtime libs are ever added.
When NuGet packages include content items, these always contain the package Id metadata item, so that other targets can reliably detect and act on items contributed by various packages in a standard way:

It would be extremely valuable to also provide that metadata in those Content items provided by the target, so they follow the same pattern and allow project/lib/package authors to customize their inclusion as needed.
NOTE: it's not really possible to just not import these items "when packing", since sometimes the packing happens as part of build, and there is also no way of knowing what "top-level" target was the one run either (i.e. no way to condition to $(Target) != 'Pack', say)
The Grpc.Core.targets declare
Contentitems for the purpose of copying to output directory of the files needed at run-time. These files should not be imported when packing, however, for example.Since these items are imported without any metadata that distinguishes them from "regular"
Contentfiles added by a library/package author, it makes it difficult to exclude them without resorting to hardcoding their filenames in a target, which makes this workaround brittle if those ever change names, paths or new runtime libs are ever added.When NuGet packages include content items, these always contain the package Id metadata item, so that other targets can reliably detect and act on items contributed by various packages in a standard way:
It would be extremely valuable to also provide that metadata in those
Contentitems provided by the target, so they follow the same pattern and allow project/lib/package authors to customize their inclusion as needed.