Folks, does anyone know how to make a usable Nuget package that contains a
native DLL? I've been searching and futzing until my fingers bleed (as
usual) but nothing works. The nuspec file is vanilla simple with the
addition of the following line to add the native DLL to the target along
with the managed DLLs. Note that I run nuget pack against the csproj file.

<file src="bin\$configuration$\FooNative.dll" target="lib\net462"/>

When I add this package to another project I get:

Failed to add reference to 'FooNative'.
  Please make sure that the file is accessible, and that it is a valid
assembly or COM component.

I've tried all sorts of combinations but it expects all the added libraries
to be managed.

Is there some trick I don't know of. I can't find a working sample.

*Greg K*

Reply via email to