Referenced dll’s and config files

15 Mar

In this post below I spoke about what happens to the dll’s you reference from a K2 process. This gets more complicated if you want to include config files with your referenced dll for 2 reasons:

  1. Even if K2 deploys your dll for you (‘copy local’ is set to true) the config file will not be deployed.
  2. You can manually copy your config file, but it won’t be loaded (and will be deleted whenever the K2 service restarts).

If you want config entries to be read you have to use a more roundabout way of getting them. The simplest way of doing this is to add the config settings into the K2HostServer.config file and then restarting your K2 service. This is risky though because each time you upgrade K2 your changes will disappear (OK not always, but most times). A nice compromise I’ve found is to merge the config files:

  1. Copy your config file (mySettings.config) to K2’s Host Server\Bin folder.
  2. Edit K2HostServer.config so that <appSettings> becomesĀ <appSettings file=”mySettings.config”>
  3. Restart the K2 service
Leave a comment

Posted by on March 15, 2011 in SmartObjects


Leave a Reply

Your email address will not be published. Required fields are marked *