excel Add-in automation object created in c# can't instantiate

B

binnsas

Hi
I've done the following:

Created a class library in c# which basically exposes a public function to
add two double values.
This works fine locally using addins i can use this function and in excel it
adds two values.
I then created a shared addin to include this class library to deploy this
to a client machine. This is where the problem begins:

In the client machine I choose addins automation and i can add my class
reference. But as soon as I try to use the function it doesn't recognise it.
I've tried accessing this from VBA module sheet it can see the function but
produces an automation error when executed.

I've installed .net 2 framework, changed the security level in excel to low
and i've run security patches, I have no idea what to do next...

Any ideas please?
 
B

b

Yes, this really helped and gave me a nudge in the right direction, basically
in my class library in project properties under signing, check sign the
assembly I then created a key. Then I added my dll assembly into the shared
addin project and checked the project prerequisites for the support update
for Micorosft.Net framework 2. I also added a special folder, Global
Assembly Cache folder and added my assembly to this. Then I ensure the dll's
property settings were set to vsdraCOM.
Then I ran the msi file generated, then I run regasm to register my
assembly. Then clicking addin aoutomation in excel add my function and
everything works well....Amazing.
 

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