Sync now error: "Could not load file or assembly 'Microsoft.Office.Interop.Outlook'" ...

Jul 31, 2013 at 11:01 AM
Hi there Zissis,

I just found this gem of a program and thought that I finally could have my calendar on the phone.

When I run the first sync, I get an error message as shown in the image below. Full log at end of messager:
Image
From the looks of it, I think it is my Microsoft.Vbe.Interop version that is wrong (12.0 instead of 11.0), but since I don't have administrator access, I can't download and install the Redistributable Primary Interop Assemblies myself. This was suggested as a solution here

I tried sidestepping the issue with using version 1.0.3 (not built on version 11.0), but it serves a set of different error messages when I try to Get My Google Calendars.

Is there something that can be done (on my or your part) to solve this?

Keep on the superb work!




Logdump from error message:
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.Interop.Outlook, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at OutlookGoogleSync.MainForm.SyncNow_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
OutlookGoogleSync
    Assembly Version: 1.0.4867.37164
    Win32 Version: 1.0.4867.37164
    CodeBase: file:///C:/Apps/BAD%201/OutlookGoogleSync.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Google.Apis.Calendar.v3
    Assembly Version: 1.2.4573.23226
    Win32 Version: 1.2.4573.23226
    CodeBase: file:///C:/Apps/BAD%201/Google.Apis.Calendar.v3.DLL
----------------------------------------
Google.Apis
    Assembly Version: 1.2.4573.23246
    Win32 Version: 1.2.4573.23246
    CodeBase: file:///C:/Apps/BAD%201/Google.Apis.DLL
----------------------------------------
npkcoxzp
    Assembly Version: 1.0.4867.37164
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Jan 15, 2014 at 6:39 AM
Hi there,

i´ve got the same issue. Any hints so far ?

Thanks and Cheers,

Julian
Jan 30, 2014 at 10:11 AM
Hi all,

If you still have this problem - you could try to download the "Microsoft.Office.Interop.Outlook" assembly and put it in the same folder as the "OutlookGoogleSync" executable.

Follow the steps described here: http://stackoverflow.com/questions/2238509/getting-to-microsoft-office-interop-word-dll/6309218#6309218 in order to download the Primary Interop Assemblies and then extract from the .msi file the required .dlls

You should be able to do this without admin privileges (although, if you installed OutlookGoogleSync, you would have needed admin privileges there, too; so... how did you install it?)
Marked as answer by AndreVonDrei on 3/17/2014 at 4:07 AM
Mar 17, 2014 at 11:11 AM
Albertinix, that was just what was needed. Thank you very much.

With regards to installing OutlookGoogleSync withouth admin rights, I never installed it, just ran the executable file (from a file location with read and execute permission).
Mar 17, 2014 at 1:28 PM
You're welcome! Glad it helped.