Reputation: 1061
I have a DLL written in c# which works fine (what it is doing is of no consequence).
I then try and call in from VB6.
Again, all is well.
When I changed the c# code to use the app.config to store configuration data the VB6 code fails.
Now I know that the DLL's in .Net look for the app.config from the calling application, but VB6 does not have this.
Is this something that I have to live with, or is there another way?
Upvotes: 4
Views: 713
Reputation: 244
This is a stab in the dark, and I don't have everything here for me to test this out, but the app.config file is usually renamed into something along the lines of MyApp.exe.config when you are building your MyApp.exe project. The dll is being called by the VB6 application (Let's say it is MyVbApp.exe) try renaming your .config file in the the deployment directory to MyVbApp.exe.config.
Upvotes: 5