I have made a NuGet package that works well when I use it from a C# project. It contains a DLL in the lib/net40
directory, and the DLL gets added as a reference.
Now that NuGet supports C++, how do I actually modify my package so that the DLL can be added as a managed reference in a C++/CLI project? I can't find any tutorials explaining this. If I try to just add the package as is, I get the following error:
You are trying to install this package into a project that targets 'Native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework.
One would think that the solution is to put the files under lib/native, but according to http://docs.nuget.org/docs/reference/support-for-native-projects, that is not supported. Also, simply putting the DLL directly under lib doesn't seem to do anything.
Apparently, I am supposed to do this with a .props
or .targets
file under build/native, but what do I need to put into those files to make this work ?