I want to write nuspec for MEF plugin.
I can copy xxx.dll to content directory, like below.
<files>
<file src="Alhambra\bin\Release\Plugins\Alhambra.Plugin.SqlServer.dll" target="content\Plugins\Alhambra.Plugin.SqlServer.dll" />
<file src="Alhambra\bin\Release\Alhambra.dll" target="lib\Alhambra.dll" />
</files>
but I can’t set file property in user project to copy output directory.
Thanks for any suggestions or code snippets.
My approach would be to add the plugin to the project as a separate file. For that you need an install script (see NuGet docs for this).
My solution for this is the following script:
param($installPath, $toolsPath, $package, $project)
Of course, when the user uninstalls the package, you need to clean up: