I am developing an add-in for excel
In excel i am adding reference to the dll file created and using functions from that
example
Set o = CreateObject("DllName.PublishFile")
here I have added reference to a .tlb
file
i.e in excel i pressed alt+f11
to goto macros, i clicked on tools, clicked on reference and added the .tlb
file by browsing to the path of the file
the location of this file is
C:/Program Files/Project/Bin/Debug
In the code , to get path of app.config
i have used
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
to get the location of dll i.e D:/ProjectName/Bin/Debug
After this, i used installshield to create installer and installed it
Now the location of the dll is C:/Program Files/Project/
Here i have app.config, dll.config etc
After installation, I changed the reference of the dll
i.e i selected .tlb file in C:/Program Files/Project/
instead of the .tlb file located in D:/ProjectName/Bin/Debug
. But it is still getting config values from the app.config in Bin/Debug!!
How can i get the values from app.config in dll's folder here?
in short
I want the path of the dll/tlb file which i have referred to in the excel macro i.e C:/Program Files/ProjectName
But it is taking the app.config present in source code path i.e D:/project/bin/debug