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?

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Development | Microsoft 365 Publishing
Developer technologies | C++
{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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.