0

I have created a COM dll using VS 2010 / VB.NET, and a setup project for it. The setup project installs and registers the dll as a COM component, however when I use it from MS Access it returns an error message saying it cannot find the settings. The settings are stored in the app.config, which is not automatically included by the setup project. Even if I include it manually the settings config-file cannot be found. Using SysInternals ProcMon I found out the dll is looking for the settings in the machine.config file.

Is it possible to make the dll use it's own settings config file?

If not, how can I make the setup project add the required settings to the machine.config?

EDIT: my COMM dll has a service reference to a web service, and I have no idea how to fix the issue that the dll cannot find the endpoint/binding configuration, if I had to implement my own config reader

George
  • 1,111
  • 3
  • 20
  • 38
  • If you search for ".net read configuration for dll file" you'll get quite some results, for example [equivalent of app.config for library (dll)](http://stackoverflow.com/questions/5190539/equivalent-of-app-config-for-library-dll). – CodeCaster Nov 15 '14 at 10:15
  • 1
    Application settings only work for EXE projects. You can never assume anything about the EXE when you create a COM component. And creating an msaccess.exe.config file in the Office install directory is a very unreasonable thing to do. It strongly suffers from the "what if two COM servers do this" problem. Just don't use application settings, deserializing your own settings class object from an .xml file that you store in a well-known location is a simple workaround. – Hans Passant Nov 15 '14 at 13:30

0 Answers0