app.config with Excel COM Add-in

K

kfarris9

Where is the app.config picked up from when I use an Excel add-in created in
C# 1.1? And what exact name is the app.confg? My assumption is that it
looks for MyAddinDllName.dll.config in the same directory as the C# assembly,
but that doesn't seem to work.
 
X

XL-Dennis

Hi,

Perhaps the following articles can get You started:

How to: Add Application Configuration Files to C# Projects
http://msdn2.microsoft.com/en-us/library/ms184658(VS.80).aspx

How to: Use an Application Configuration File to Target a .NET Framework
Version
http://msdn2.microsoft.com/en-us/library/9w519wzk(VS.80).aspx

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
K

kfarris9

Not exactly my problem. The process which loads my add-in is Excel. So, in
my code the domain.SetupInformation.ConfigurationFile reports to be
excel.exe.config. If I put my app.config in the Office11 folder where the
Excel.exe resides and name it excel.exe.config then I can get to my
app.config values. However, that probably isn't the best answer. So, is the
answer for my add-in to create another domain and run all my C# code in that
domain? I can't do away with the app.config because this add-in is trying to
bring functionality from an existing managed code app into Excel. So, the
entire app (which I'm tapping into) is built based on the app.config.
 
X

XL-Dennis

If You want the C# solution to be isolated and loaded in its own AppDomain
then shimming might be the right way to go.

Isolating Office Extensions with the COM Shim Wizar
http://msdn.microsoft.com/library/d...dno2k3ta/html/ODC_Office_COM_Shim_Wizards.asp

I hope someone else of the more frequent visitors here can give You a
straight answer to Your question. I only develop with VB.NET which limit my
knowledge of C#...

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top