I am creating a windows com object in VS2010 and VB.net (interop)
This com object should be able to work with any NON managed code application such as word, Excel or in this case Access.
The creating of the com object and using regasm etc. works fine. No problem.
However the INSTANT I create a com object that requires connection strings or anything else from the app.config file then it fails. In this case it happens to be a web service and the common "endpoint" or app.config file could not be found error occurs. (if it was just a connection string I would simply read in this value – but the config file quite messy due to a web service definition).
There is some suggesting that placing the .dll's and app.config in the SAME directory as the office program such as excel then renaming the config file as Excel.exe.config should work.
This does not seem to be working for me.
Is there a means to have the vb.net class (.dll) that is now a com object to know to load + use a config file for the .dll and not some main application file?
Note that in this case I do NOT have a main application config file since I am launching a non managed application like word or Excel and attempting to use my class object.
In vb.net obviously I can copy the config file stuff from the .dll to the main application config and we are off to the races. I don't have a managed "main" file as noted.
So how do I get the class.dll file to load up the class.dll.config file when an instance of the object is created in non managed code?