API Works With 64 Bit SolidWorks But Errors Out With 32-bit SolidWorks

I have a program that I wrote in Visual Studio Express 2012.  The exe file works fine when I run it with 64 bit solidworks.  I open the exe, the form opens up, I enter my information, and SolidWorks does what it needs to do.  When I try to run the program on another computer with 32 bit solidworks, the form opens, but once I hit enter for the form to call my module that connects to SolidWorks, the program errors out.  The project is using .NET Framework 3.5 and the target CPU is set to x86.  The program connects to SolidWorks with Dim swApp as SldWorks = GetObject(, "Sldworks.Application")

Thanks.

 

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.IO.FileNotFoundException: Could not load file or assembly 'SolidWorks.Interop.sldworks, Version=20.2.0.55, Culture=neutral, PublicKeyToken=7c4797c3e4eeac03' or one of its dependencies. The system cannot find the file specified.

File name: 'SolidWorks.Interop.sldworks, Version=20.2.0.55, Culture=neutral, PublicKeyToken=7c4797c3e4eeac03'

at Test.Module1.main()

at Test.ChassisGenerator.Enter_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.3625 (GDR.050727-3600)

CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

----------------------------------------

Test

Assembly Version: 1.0.0.0

Win32 Version: 1.0.0.0

CodeBase: file:///C:/DOCUME~1/xxxxxxxxx/LOCALS~1/Temp/notesEA312D/~3908628.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.3620 (GDR.050727-3600)

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.3623 (GDR.050727-3600)

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

----------------------------------------

************** 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:

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.

SolidworksApi macros