NuGet package that just copies project output to binaries folder

760 views Asked by At

I'm developing an application that uses Prism to dynamically load some assemblies containing modules and extend my application. At the moment I just have one Visual Studio solution containing the application and all module projects and the module assemblies (output of the module projects) are copied to the application output directory via post build events. The module assemblies should now be provided as NuGet packages.

When creating a NuGet package usually the project output will be referenced by the project that uses the package. Is there a way to just copy the project output to the output directory of the application?

I found Contrib.Nuget for copying additional binaries to the output, but I'm looking for a way for the project output itself.

An example:

  • Project MyApplication builds an executable called MyApplication.exe
  • Project MyModule builds a library called MyModule.dll
  • Project MyApplication should use NuGet to get MyModule, but MyModul.dll should not be referenced but just copied to the output of MyApplication
1

There are 1 answers

0
Good Night Nerd Pride On

You want your NuGet packages to change the build events when installed. There already is a question with answers on how to achieve this.