Forum Discussion

CBullen1's avatar
CBullen1
Copper Contributor
Feb 03, 2024

How do I use MSIX to deploy an Office COM Addin?

25 years ago, my husband wrote some COM Addins in VB6 to extend the Office VB Editor ("Smart Indenter" and "VBE Tools"). They don't work in the 64-bit Office and Microsoft 365 builds and we've finally got round to rewriting them in C#. So we now have some C# COM Addin DLLs in Visual Studio 2022 Consumer Edition to package, deploy and ideally make available in the Microsoft Store for a nominal sum.

From what I've read (which could be out of date):

- If I want to use the Microsoft Store pricing, sales and licensing integration, my 'App' has to be packaged and deployed using MSIX through the Partner Center.

- If I use MSIX, I don't need to code-sign my App, as the MS Store deployment does that for me.

- The Office 365 VB Editor only supports the COM Addin extensibility model.

- An Office 365 COM Addin has to be an in-process COM Server.

- I can build an MSI deployment package for a C# in-process COM Server that works fine.

- If I distribute an MSI package through the Microsoft Store, I have to use a third-party pricing/payment/licensing solution and it has to be code-signed with an official certificate.

 

The sweet spot for me in there is to be able to create an MSIX deployment package in Visual Studio that will deploy and register my COM Addin in a way that Office (the VB Editor) will see and use. But is that possible, and if so, how?

If it's not possible to deploy a COM Addin using MSIX, is it possible to integrate with the Microsoft Store pricing/payment/licensing solution with an MSI package?

 

On reading a bit more, one possible solution might be:

  • I build the C# COM Dll and a Windows Form exe that references it.
  • I use the MSIX installed to install the Windows Form exe
  • In the MSIX, I include the RegistryWriteVirtualization options to disable the virtualization for the exe.
  • When the exe is launched, I give the user the option to run regasm on the c# COM Dll, which should register the COM component into HKCU and all should work.

But would MS allow it to be done in a Store app?

 

No RepliesBe the first to reply

Resources