none
System.MissingMethodException: Method not found: 'Void Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Microsoft.Office.Tools.Outlook.Factory, System.IServiceProvider, System.String, System.String)'. RRS feed

  • Question

  • Hi,

    I try to create a Outlook 2013 Addin, but for some time now I get this Error when Outlook is trying to load the Addon:

    System.MissingMethodException: Method not found: 'Void Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Microsoft.Office.Tools.Outlook.Factory, System.IServiceProvider, System.String, System.String)'.

    It already worked once before, but after installing the VSTO Update via WU, these are began, after uninstalling VSTO and repairing the VS installation to reinstall it again, these are still here.
    I'm not sure what's exactly the reason for these errors, is it my local Outlook/office installation?
    Is it the VSTO installation?
    Is it the VS installation?

    Anybody know how to fix/trackdown the reason of this error?

    Or if this is the wrong place to ask this question, can somebody redirect me to the right location?

    Thursday, August 21, 2014 12:07 AM

Answers

  • I just noticed that my VSTO Version shows 10.0.0.50325, and the Last Version seems to be 10.0.50701.
    Also there are some changes in VS2013 Update 3(de-coupling of Office versions from .NET versions, link http://blogs.msdn.com/b/vsto/archive/2014/08/04/visual-studio-2013-update-3-released.aspx)
    I will install the new VSTO Version ans test again.
    Friday, August 22, 2014 8:30 PM

All replies

  • Hello Alexander,

    VSTO is included to paid editions of Visual Studio. There is no need to install it separately.

    Did you have a chance to check out the reference of your add-in project? Is there any missed reference?

    Could you please specify the version of Visual Studio?

    Did you have a chance to create a brand new sample add-in and compare all settings? Is there any difference between projects? Does a newly created add-in work or do you get the same exception?

    Thursday, August 21, 2014 10:26 AM
  • Hi,

    >>Did you have a chance to check out the reference of your add-in project? Is there any missed reference?

    No, I get the very same error when I create a new empty Outlook Addin, so I'm sure there is a problem elsewhere.

    >> Could you please specify the version of Visual Studio?

    I have VS 2012 Ultimate & VS2013 Ultimate installed and have the same problem with booth.

    >> Did you have a chance to create a brand new sample add-in and compare all settings?
    Yes I did, but this didn't help

    >> Is there any difference between projects? 

    Some, but non that seem relevant to me. (Mostly changed settings in the VS GUI like 'Option Strict'.

    >> Does a newly created add-in work or do you get the same exception?

    Very same Exception.

    I forgot to mention, I use VB.Net, and created a VB.Net sample, I didn't try a C# Sample yet.


    • Edited by Alexander Wurzinger Thursday, August 21, 2014 11:15 AM I wrote VS2010 instead of VS2012
    Thursday, August 21, 2014 10:36 AM
  • Well, it looks like something wrong with your machine. I'd suggest repairing Visual Studio first.

    Thursday, August 21, 2014 12:16 PM
  • Probably.
    But I repaired on VS installation not too long a ago, but I will repair booth this evening.
    Also I forgot to mention, I uninstalled and reinstalled the VSTO Updates for VS2012 & VS2013, but this didn't change anything.

    I will report if it still happens after the repairs, probably tomorrow.

    Thursday, August 21, 2014 12:44 PM

  • VS2012, then VS2013.
    Thursday, August 21, 2014 1:13 PM
  • I did that, but there is no change.

    I tried a C#outlook plugin, but with c# I get this Error:

    System.InvalidCastException occurred
      _HResult=-2147467262
      _message=Unable to cast object of type 'Microsoft.Office.Tools.Outlook.OutlookAddInImpl' to type 'Microsoft.Office.Tools.Outlook.OutlookAddIn'.
      HResult=-2147467262
      IsTransient=false
      Message=Unable to cast object of type 'Microsoft.Office.Tools.Outlook.OutlookAddInImpl' to type 'Microsoft.Office.Tools.Outlook.OutlookAddIn'.
      Source=Microsoft.Office.Tools.Outlook.v4.0.Utilities
      StackTrace:
           at Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Factory factory, IServiceProvider serviceProvider, String primaryCookie, String identifier)
      InnerException:

    Thursday, August 21, 2014 8:58 PM
  • What .net framework version did you choose as a target one?
    Friday, August 22, 2014 7:06 PM
  • I tried multiple Version between 4.0 and 4.5.2, but I don'T know witch exactly, and I didn'T test every compination (VB.Ne/C# + .Net 4.0, 4.5, 4.5.1, 4.5.2)

    I will try them and report back.

    Friday, August 22, 2014 7:09 PM
  • Basicly always the Same Error.

    Here is my testlog.

    VS2013:
    C# 4.0:

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn8.ThisAddIn in assembly OutlookAddIn8, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.Office.Tools.Outlook.OutlookAddInImpl' to type 'Microsoft.Office.Tools.Outlook.OutlookAddIn'.
       at Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Factory factory, IServiceProvider serviceProvider, String primaryCookie, String identifier)
       at OutlookAddIn8.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider) in c:\Users\wa\Documents\Visual Studio 2013\Projects\OutlookAddIn8\OutlookAddIn8\ThisAddIn.Designer.cs:line 29
       --- End of inner exception stack trace ---
    

    C# 4.5

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn9.ThisAddIn in assembly OutlookAddIn9, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.Office.Tools.Outlook.OutlookAddInImpl' to type 'Microsoft.Office.Tools.Outlook.OutlookAddIn'.
       at Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Factory factory, IServiceProvider serviceProvider, String primaryCookie, String identifier)
       at OutlookAddIn9.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider) in c:\Users\wa\Documents\Visual Studio 2013\Projects\OutlookAddIn9\OutlookAddIn9\ThisAddIn.Designer.cs:line 29
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)
    

    C# 4.5.1

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn10.ThisAddIn in assembly OutlookAddIn10, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.Office.Tools.Outlook.OutlookAddInImpl' to type 'Microsoft.Office.Tools.Outlook.OutlookAddIn'.
       at Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Factory factory, IServiceProvider serviceProvider, String primaryCookie, String identifier)
       at OutlookAddIn10.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider) in c:\Users\wa\Documents\Visual Studio 2013\Projects\OutlookAddIn10\OutlookAddIn10\ThisAddIn.Designer.cs:line 29
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)
    

    C# 4.5.2

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn11.ThisAddIn in assembly OutlookAddIn11, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.Office.Tools.Outlook.OutlookAddInImpl' to type 'Microsoft.Office.Tools.Outlook.OutlookAddIn'.
       at Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Factory factory, IServiceProvider serviceProvider, String primaryCookie, String identifier)
       at OutlookAddIn11.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider) in c:\Users\wa\Documents\Visual Studio 2013\Projects\OutlookAddIn11\OutlookAddIn11\ThisAddIn.Designer.cs:line 29
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)

    VB.Net 4.0

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn12.ThisAddIn in assembly OutlookAddIn12, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Microsoft.Office.Tools.Outlook.Factory, System.IServiceProvider, System.String, System.String)'.
       at OutlookAddIn12.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)

    VB.Net 4.5

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn13.ThisAddIn in assembly OutlookAddIn13, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Microsoft.Office.Tools.Outlook.Factory, System.IServiceProvider, System.String, System.String)'.
       at OutlookAddIn13.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)

    VB.Net 4.5.1

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn14.ThisAddIn in assembly OutlookAddIn14, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Microsoft.Office.Tools.Outlook.Factory, System.IServiceProvider, System.String, System.String)'.
       at OutlookAddIn14.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)
    

    VB.Net 4.5.2

    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateStartupObjectException: Could not create an instance of startup object OutlookAddIn15.ThisAddIn in assembly OutlookAddIn15, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void Microsoft.Office.Tools.Outlook.OutlookAddInBase..ctor(Microsoft.Office.Tools.Outlook.Factory, System.IServiceProvider, System.String, System.String)'.
       at OutlookAddIn15.ThisAddIn..ctor(Factory factory, IServiceProvider serviceProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.CreateEntryPoint(String entryPointTypeName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.LoadEntryPoints(IntPtr serviceProvider)

    Friday, August 22, 2014 7:16 PM
  • I tried the C# plugin samples for Word/Excel/visio/msproject/Powerpoint, work without any problems.

    Could there be a problem with my office/outlook installation?
    I have a Professional Plus 2013 installed.

    Friday, August 22, 2014 7:35 PM
  • I have re-read your messages from the beginning and noticed the following:

    > but after installing the VSTO Update via WU, these are began, after uninstalling VSTO and repairing the VS installation to reinstall it again, these are still here.

    what VSTO update are you talking about? and how did you uninstall VSTO if it is a part of Visual Studio?

    Friday, August 22, 2014 7:53 PM
  • >>what VSTO update are you talking about?
    Link: http://support.microsoft.com/kb/2961149/en

    >> and how did you uninstall VSTO if it is a part of Visual Studio?

    WU showed a VSTO 2010(Microsoft Visual Studio 2010Tools for Office Runtime (x64) ) Update, witch was/is listed in 'Program and Features', probably because I had a older build installed.
    It has the KB2961149.
    Also VS2012 doesn't have VSTO integrated, but has it as a separate download.
    Only after installing it, are the templates/samples present.
    But VS2013 has VSTO integrated, but has a seperate Update download.
    I think the Installer for these two was called WEB Installer 5.0, and is also used to install many other Microsoft Products (+Dependencies).



    Friday, August 22, 2014 8:04 PM
  • I just noticed that my VSTO Version shows 10.0.0.50325, and the Last Version seems to be 10.0.50701.
    Also there are some changes in VS2013 Update 3(de-coupling of Office versions from .NET versions, link http://blogs.msdn.com/b/vsto/archive/2014/08/04/visual-studio-2013-update-3-released.aspx)
    I will install the new VSTO Version ans test again.
    Friday, August 22, 2014 8:30 PM
  • Hi Alexander,

    Since this thread is been here for a long time and there is no any update, I have marked this possible reply as answer.

    If you have any update, please let us know.

    Regards,

    George.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Sunday, August 31, 2014 3:32 PM
    Moderator