Click once deployment - deployed application runtime error

0

I used the deploy feature from VS community 2017 for a custom level excel workbook 2010. The installation package got created on the client computer. I could run the setup and checked that the workbook was installed. At run time I got hang on an exception which I figured means that VSTO runtime library is not properly set. Here is the error message I got (this is french sorry about that - word to word it says "Element not found":

System.Runtime.InteropServices.COMException (0x80070490): Élément introuvable. (Exception de HRESULT : 0x80070490)
à Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IHostItemProvider.GetHostExtender(String extenderType, String extenderCookie, IntPtr& extenderObject)

The workbook has a button layed on the surface of a sheet on some code C#.NET attached to the document.

It works and run on the development host not on the client host. Both are windows 10 OS.

The deployed components are : .NET Framework 4.5.2 VS 2010 for Office Runtime

checking on the client computer I see .NET 4.6.* and VS 2010 for Office Runtime installed. Theoretically .NET.4.6.* is backward compatible .NET 4.5.2.

Digging deeper I think something is wrong with VSTO run time. I ve read that the VSTO system runtime includes libraries used for the Microsoft.VisualStudio.Tools namespace. What's weird is that there is the same interface but in another namespace, Microsoft.Office.Tools, which is hardly not document ("This API supports the product infrastructure and is not intended to be used directly from your code").

I also have checked that the PIA is installed for Office and Excel.

I had VS 2017 installed on that computer afterward (after trying to run the deployed workbook). I used the exact same code, built the solution and got the same exception ! Any clue on what to check ?

c#
vsto
clickonce
visual-studio-2017
excel-addins
asked on Stack Overflow Mar 27, 2017 by pascal sautot • edited Mar 29, 2017 by pascal sautot

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0