I am running into a strange issue. I am developing a Outlook 2007 addin using Visual Studio 2010 with VSTO 3.0 and deployed using ClickOnce.
I would like to check if there are any updates and if so prompt the user to restart outlook.
However if I call ApplicationDeployment.CheckForDetailedUpdate or ApplicationDeployment.CheckForUpdate I get the following exception:
DependentPlatformMissingException: Unable to install or run the application. The application requires that assembly Microsoft.Vbe.Interop.Forms Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first.
I've attached a sample project that repros the issue. Here is the link:http://dl.dropbox.com/u/4701630/TestOutlookAddIn2.zip
To repro,you need Windows 7 x64, Visual Studio 2010 and Office 2007 installed with all components
1) Set a breakpoint on line 19 of ThisAddIn.cs
2) Build the solution in debug
3) Go to the TestOutlookAddIn2\bin\Debug folder and execute TestOutlookAddIn2.vsto
4) Run Outlook and at startup, you should see a message box popup with the text "I'm in"
5) In Visual Studio, attach the debugger to the Outlook.exe process
6) Hit ok on the messge box and debugger should hit your break point.
7) Keep stepping and when you execute line 21, you will get DependentPlatformMissingException
Thanks