Resolving near-circular dependencies within solutions?

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
Hi guys

I have a logical puzzle here regarding building my solution.

At the core, is a service project called MyService.
The service enumerates DLLs found in a directory, and any that are deemed to be plugins for the service (because they are subclasses of MyService.IPlugin) are loaded.
It thus follows that any plugin (such as the MyPlugin project) should have a reference to the service, in order to implement the IPlugin interface, and also make use of other things the service provides via a class called CoreServices

Hence, MyService must be built first, then MyPlugin. The IDE knows this


Now what I want is to have the output from MyPlugin, copied to MyService\bin\DEBUG OR RELEASE\plugins\ folder.


Initially I had done thing by making the build output into the directory of MyService\plugins, and telling the ide that the path plugins\MyPlugin.* should be COPY ALWAYS to the output folder of MyService..

This falls down because MyService must be built first, before the files exist to be copied..

So how do you guys have your DLL plugins build in such a way that the host app can load them, without manually copying the files round yourself? Should I make the MyPlugin build straight into MyService\bin\Debug\plugins ?
What of when I change the mode to Release? will it automatically build into MyService\bin\Release\plugins ?

How does one do these things? :)

Thanks in advance
 
Ah.. I have since discovered that the output folder for Debug and Release configurations can differ (and one chooses by using the combo box at the top of the Properties.Build page)

I have, for now, set the debug build to build into ..\..\MyService\bin\debug\plugins and the release build to ..\..\MyService\bin\release
 
Back
Top