Any idea about DependentPlatformMissingException Microsoft.Vbe.Interop.Forms Version 11.0.0.0

Add-in Express™ Support Service
That's what is more important than anything else

Any idea about DependentPlatformMissingException Microsoft.Vbe.Interop.Forms Version 11.0.0.0
 
mat3




Posts: 15
Joined: 2010-05-06
Hi 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.CheckForDetailedUpd ate or ApplicationDeployment.CheckForUpd ate 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.

This happens on both my dev machine and on the remote machine.

Here's what I've tried so far with no success: - Uninstalled and reinstalled Office 2007 PIAs - Added Microsoft.Vbe.Interop.Forms v 11.0.0.0 (file version 12.*) as a reference to my project - Verified that the dll with the correct version is in my GAC

I have no idea why this exception is occurring. Hope you can help.

Update: I just tried this brand new VS 2010 projects. Here is my addin file

If my framework is se t to .net 4, it works fine. If my framework is se t to .net 3.5, I get the same exception and error.

Here is the code from the brand new project

namespace TestOutlookAddIn2
{
public partial class ThisAddIn
{

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{ MessageBox.Show("I'm in");

if (ApplicationDeployment.IsNetworkDeployed)
{
var info = ApplicationDeployment.CurrentDeployment.CheckForDetailedUpdate();
}
}

private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}

#region VSTO generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
{
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
}

#endregion
}
Posted 30 Jun, 2010 23:41:19 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hi,

Assuming that all updates are installed, I'd check if installing all Excel components influences this behavior.

A couple of [probably] side questions.
- Is your Windows a 64-bit one?
- What are Windows and Office localizations?

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Jul, 2010 02:11:11 Top
mat3




Posts: 15
Joined: 2010-05-06
Hi Andrei,
Thanks for your response. All Excel and actually all Office components were already installed.

I am running Windows 64 bit and both windows and office are en-us

Thanks once again.

Matt
Posted 01 Jul, 2010 03:30:42 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Posted 01 Jul, 2010 03:49:41 Top
mat3




Posts: 15
Joined: 2010-05-06
Yes, they dont really help because in my case Microsoft.Vbe.Interop.Forms Version 11.0.0.0 is actually installed on my machine in the gac. (I checked using gacutil)

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 very much

Matt
Posted 01 Jul, 2010 13:29:18 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Matt,

I've reproduced the problem on Vista SP2 32-bit + VS 2010 + Office 2010 SP2. I had to wrap the call to CheckForDetailedUpdate() into a try/catch block, however; otherwise, the add-in is turned off as soon as this call is performed.

I tried using an outlook.exe.config pointing to .NET Framework 2.0 with no success. At the moment I don't have other ideas.

Note that you also need to have Visual Studio Tools for the Office system 3.0 Runtime in prerequisites.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Jul, 2010 06:05:03 Top
mat3




Posts: 15
Joined: 2010-05-06
Andrei,
Thanks very much for trying it out.

I'm discussing with MSFT support on this issue on this thread: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/3b11a0ca-f2bf-4840-bd14-e26bdbdf7ed3/

If you can add in your comments to that thread, would help to get a response from them.
Thanks very much

Matt
Posted 06 Jul, 2010 02:20:19 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Matt,

Thank you for pointing me to the discussion. Sorry, I cannot add a word; I don't have any ideas, too.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jul, 2010 08:49:10 Top