Click here to Skip to main content
15,847,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have created a VSTO Word Addin. It has generated a DLL file. I don't want to deploy that as an EXE. But I want to use a C# application(EXE) to call or invoke this VSTO dll. Is this possible? If possible how do I implement?

Please note that I don't want to deploy my Addin as an EXE. I only want my VSTO addin to remain as a DLL and then to be called from an EXE.

I have tried the below approach with no luck.

1) WordAddIn.ThisAddIn addin = new WordAddIn.ThisAddIn(null, null);

Here the WordAddin is the VSTO dll.

2) Using Reflection
Assembly newAssembly = Assembly.LoadFile("C:...bin\\Debug\\WordAddin.dll");

    Type[] types = newAssembly.GetExportedTypes();
    Type entryType = newAssembly.GetType("ThisAddin");
    object o = Activator.CreateInstance(types[0], true);

I get the 'No parameterless constructor defined for this object.' in this case.

Unable to go further!. Kindly suggest.
Updated 11-Mar-14 7:50am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900