I’ve been following the beginner’s tutorial for building SW Addins at Angel Six. I’m trying to get Visual Studio to automatically register the DLL, but I’m using 64 bit SolidWorks on a 64 bit machine, and it doesn’t seem to want to do it automatically. I’ve performed the two steps described in the tutorial (Make Assembly COM-Visible and Register for COM Interop).
When I build, I don’t get errors of any kind, it’s just that when I check the registry with regedit I don’t see my addin in SOFTWARE/SolidWorks/Addins , nor can I seem to find it anywhere (e.g. I looked under HKEY_CURRENT_USER in addition to HKEY_LOCAL_MACHINE).
Like I said, I am curious if Visual Studio can automatically register 64 bit DLLs; I went through the manual registration process using 64-bit regasm.exe, and that worked just fine.
I’m running VS 2010 Express on a Windows 7 Machine with SolidWorks 2012 x64 Student Edition installed. Anyone have thoughts?
The “Register for COM interop” option in Visual Studio 2010 Express only works for 32-bit COM servers (as mentioned by Hans Passat above). To get the DLL to register appropriately with COM for SolidWorks, you can run cmd AS ADMINISTRATOR, then do the following
This is possible to run as a post-build action in VS 2010 express, just go to the properties of your project, click the build tab, and add those two lines above to any commands you may already have.
The plugin should then successfully register and work with 64-bit SolidWorks.