Not a valid Office Add In

Sachin picture Sachin · Sep 7, 2009 · Viewed 19.6k times · Source

I developed a new Office 2007 addin using VS 2008 and VSTO. after this I go to Office->Excel Options->AddIns->COM AddIns and GO... If I select the .dll which I ve created I get the error

'<path>' is not a valid Office Add In.

If I run it using the Visual Studio 2008 at my development machine, it works fine and I see the add-in.

I searched so many posts but didn't get a solution.

Answer

Jeremy Thompson picture Jeremy Thompson · Nov 15, 2012

Excel kept rejecting the Add-In, so the solution for me was doing it directly via the registry.

Save the below text as a .reg file, replace the Manifest path and FriendlyName to suit your PROJECT and double click the reg file to add the key to the Registry.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\PROJECTExcelAddIn]
"Manifest"="file:///C:\\TFS\\Pg.PROJECT\\PROJECTExcelAddIn\\Src\\PROJECTExcelAddIn\\PROJECTExcelAddIn\\bin\\Debug\\PROJECTExcelAddIn.vsto"
"FriendlyName"="PROJECTExcelAddIn"
"LoadBehavior"=dword:00000003
"Description"="PROJECTExcelAddIn - Excel add-in for PROJECT."