Could not load file or assembly 'stdole'

SETP
SETP used Ask the Experts™
on
I wrote a Visual Basic 2008 application targetting the .NET Framework 2.0. It runs fine on my development PC, but when I run it on a deployment machine, I get the following error:

Could not load file or assembly 'stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

The deployment PC has .NET Framework 3.5 installed.
The two differences I can see between the two PCs is that the development PC has Visual Basic 6.0, Visual Basic .NET 2003 and Visual Studio 2008, as well as Office 2007, while the deployment PC only has Office 2003. However, my application does not use Office in any way. Here is the stack trace:

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at RadioTracker.frmOptions.ApplySettings()
   at RadioTracker.frmOptions.cmdOK_Click(Object eventSender, EventArgs eventArgs)
   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.3053 (netfxsp.050727-3000)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RadioTracker
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/RadioTracker.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Interop.DXVUFFT
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/Interop.DXVUFFT.DLL
----------------------------------------
Interop.MapObjects2
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/Interop.MapObjects2.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks
    Assembly Version: 9.0.0.0
    Win32 Version: 3.0.30214.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/Microsoft.VisualBasic.PowerPacks.DLL
----------------------------------------
DXVUMeterNET
    Assembly Version: 3.0.5.1
    Win32 Version: 3.0.6.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/DXVUMeterNET.DLL
----------------------------------------
Microsoft.DirectX.DirectSound
    Assembly Version: 1.0.2902.0
    Win32 Version: 5.04.00.2904
    CodeBase: file:///C:/Program%20Files/RadioTracker/Microsoft.DirectX.DirectSound.DLL
----------------------------------------
AxInterop.MO21legend
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/AxInterop.MO21legend.DLL
----------------------------------------
AxInterop.MO21ScaleBar
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/AxInterop.MO21ScaleBar.DLL
----------------------------------------
AxInterop.MapObjects2
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/AxInterop.MapObjects2.DLL
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
MixerProNET
    Assembly Version: 1.2.4.0
    Win32 Version: 1.2.5
    CodeBase: file:///C:/Program%20Files/RadioTracker/MixerProNET.DLL
----------------------------------------
nxze5nxb
    Assembly Version: 0.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.DirectX.Direct3D
    Assembly Version: 1.0.2902.0
    Win32 Version: 9.05.132.0000
    CodeBase: file:///C:/Program%20Files/RadioTracker/Microsoft.DirectX.Direct3D.DLL
----------------------------------------
Interop.MO21legend
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/Interop.MO21legend.DLL
----------------------------------------
Interop.MO21ScaleBar
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/Interop.MO21ScaleBar.DLL
----------------------------------------
Interop.VBRUN
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.0.0
    CodeBase: file:///C:/Program%20Files/RadioTracker/Interop.VBRUN.DLL
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
Microsoft.DirectX
    Assembly Version: 1.0.2902.0
    Win32 Version: 5.04.00.2904
    CodeBase: file:///C:/Program%20Files/RadioTracker/Microsoft.DirectX.DLL
----------------------------------------
gm7sd8yq
    Assembly Version: 0.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
c9f8kfq6
    Assembly Version: 0.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I noticed that even though the file stdole.dll was in my references, it was not included in the Setup package. I manually copied this file to the deployment machine (to the same folder as the EXE) and now it works. Should I simply include this file in my Setup package and everything should be fine?

Author

Commented:
I've noticed that the stdole.dll file referenced in my application is apparently in the following folder:

C:\WINDOWS\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll

However, that folder does not exist on my PC. Maybe that's why it wasn't included in the Setup package? I did, however, find the file in:

C:\Program Files\Microsoft.NET\Primary Interop Assemblies

which appears to have done the trick. Should I simply manually add this file to the Setup package?
Commented:
If you insist on using that version of stdOle, add NET 1.1 to the prerequisites of your setup or add stdole.dll to your setup-package.
The difference between the two methods is that the first one will install it in the GAC and that it will be upgraded if needed. The second one will assure that you will always work with that version of the dll, no matter what happens elsewhere.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial