How can I publish a VSTO Plugin (for Outlook) which includes a DLL I have created?

John McLaughlin 1 Reputation point
2022-02-03T01:06:26.52+00:00

I have an Outlook Plugin I created with VSTO/C# which uses a C++ DLL (via a SWIG interface). When I publish the Plugin I would like to include the Solution's DLL as part of the setup.exe and have it deployed to a suitable directory. I am not considering a COM/ATL plugin at this time.

I have found it all works if I manually copy the DLL into the Outlook.exe directory in Program Files, but this is not a sound solution.

Does the VSTO Publish mechanism support this? Or do I need to "roll my own" separate "installer" which does everything setup.exe does?

Also, where can the DLL be installed (other than Program File) such that Outlook+Plugin can load it?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,479 questions
Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
595 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dmitry Streblechenko (MVP) 16 Reputation points MVP
    2022-02-19T19:34:16.043+00:00

    Your VSTO addin can use any dll of your choosing as long as it knows where it can be loaded from. Placing it next to your VSTO addin dll should work fine.
    You can add the C++ dll as a file referenced by your project to have it copied.