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:
- Even if K2 deploys your dll for you (‘copy local’ is set to true) the config file will not be deployed.
- 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:
- Copy your config file (mySettings.config) to K2’s Host Server\Bin folder.
- Edit K2HostServer.config so that <appSettings> becomes <appSettings file=”mySettings.config”>
- Restart the K2 service