2

I am currently writing applications with a plugin system. Plugins are separate projects that are not referenced to the main project only to the pluginAPI project. Plugins dll's are copied to a separate folder without dependencies. If PluginAPI reference to nuget package it's ok since can handle this but the problem appears when the plugin refers to a nuget package that is not installed in the PluginAPI project. I would like Visual Studio to automatically copy the dll files that I point to the build folder.

KAW
  • 21
  • 1
  • 2

3 Answers3

0
  1. You can add a post-build event, where you can use the xcopy to copy files to the desired directory. Please see https://stackoverflow.com/a/11001949/6382313 for details
  2. You can add the NuGet to the API project as well, it will also copy the NuGet output to the API build directory
mhsarosh
  • 308
  • 1
  • 7
  • The second solution destroys the whole meaning of the plugin system. First solution sounds good but I need example. – KAW Jun 27 '21 at 19:16
0

From what I know, NuGet packages ( For Example EPPlus ) automatically add their dlls as a reference, you can right-click on that reference and change the Property Copy Local to true. This will copy that dll file to the output folder.

0

You can use use Package.config to reference nuget packages. enter image description here

Dylan
  • 504
  • 2
  • 5
  • 9