The SolidWorks SDK doesn't work with Visual Studio 2015. See SPR 935330. You can email firstname.lastname@example.org and have your name added to the notification list so you can be notified when this is resolved. The solution, then, is to open it in an earlier version of Visual Studio.
If you don't really care about having the API SDK working on your computer and instead simply want the sample addin, then, for your convenience, I have attached the VB.NET and C# SDK addins. You will be able to open them in VS 2015. Please note:
- I have created a "thirdparty" folder in each solution folder so that you don't have to browse for SolidWorks interops on your computer. Normally this folder is not created by the SDK.
- I have added an "unregister.bat" file in each solution folder. If you want to "uninstall" the addin, double click on this when SolidWorks is not open. It should say "types unregistered successfully".
- These addins are pointing to the SLDWORKS.EXE location on my computer for the start program. Likely your EXE will be located elsewhere. Therefore, you need to go into Project Properties-->Debug and change the path in "Start external program" to the correct one on your computer. Otherwise you won't be able to run your add in debug mode.
Why, may I ask, do you need the SDK? If the purpose is to learn to write addins, you'll have your work cut out for you. The SDK "template" isn't really a template, but a fully-functioning "sample" addin. It contains a tremendous amount of code that would never find its way into the vast majority of addins, and neither the essential nor non-essential code is documented in the addin comments. Therefore, you have a to spend a lot of time dissecting it and figuring out what is "core" and what isn't.
The only things an addin must do are 1) implement ISwAddin (available in SolidWorks.Interop.swpublished), 2) specify a GUID and COM visibility. However, there are many other things that an addin ought to do in order to make your life easier as a developer. These are too numerous to fully mention here, but at minimum it is helpful to have your addin create the registry keys necessary for SolidWorks to see your addin after it is registered with COM.
If you want to learn to write an addin from scratch using techniques and pointers that I have collected over the past several years, I do sell a written guide on how to do so. Please email me (visit the Contact page at the link below) if you are interested.
SDK Addins.zip 1.4 MB