I made a SolidWorks Addin using VB 2015. It works fine on SolidWorks 2015 but does not work on any higher release for SolidWorks (e.g. 2016, 2017). Not sure what I am doing wrong as these addins should not be release specific.
Any Help Would be greatly appreciated.
Thanks, Pranav
This happens for a couple of reason, always associated with where the COM Interop files were and are now on your system.
The first is if you referenced the exposed COM that is available when you install SolidWorks from the screen below. This always created problems when the old version of SolidWorks is uninstalled or upgraded. Your projects will show a warning within the references in your project.
The second often happens when you reference the Interop dll from the installation location (usually C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\api\redist\SolidWorks.Interop.sldworks.dll). This is what the SolidWorks Addin Template does by default. Sometimes if you forget to remove the SolidWorks installation directory when installing a new version of SolidWorks, it creates a folder with a different name (SOLIDWORKS Corp\SOLIDWORKS (2) by default). The problem is now the referenced dll file's path has changed and your project can no longer find it.
The best way to solve these issues is to create a copy of the dlls you want to reference in your project's folder structure and browse to them within your project like below.
Doing this will ensure that your project always references this dll, that shouldn't be removed or have its path changed regardless of what you do with your SolidWorks Installation.
If for some reason the addin template does reference this location, go to your references in the Project Explorer, and remove them, and re-point them to a local copy (not the installed files).