Skip to main content

Fix missing Visual Studio SOLIDWORKS API SDK project templates

Symptoms

SOLIDWORKS API SDK installation process{ width=250 }

After installation of SOLIDWORKS API SDK no project templates are shown in Visual Studio New Project dialog for C# and VB.NET

Cause

System error happened while installing the templates and registering the Wizard assembly in the Global Assembly Cache (GAC). This might be caused by permission issues.

Resolution

  • Locate SOLIDWORKS API SDK.msi file. Usually found in apisdk folder of installation DVD or SOLIDWORKS download package.

  • The MSI package is a zip storage. Extract (unzip) the file using any Archive tools which support zip format (such as WinRar, WinZip or 7-Zip)

Unzipping .msi package{ width=500 }

  • Find swvbaddin.zip for VB.NET template and swcsharpaddin.zip for C# template in the files of the unzipped folder.

  • Open Visual Studio and select Tools->Options... menu command. Navigate to Projects and Solutions group.

Projects and Solutions options in Visual Studio{ width=400 }

  • Copy the path of the User project templates location field value and open this folder in the explorer

  • Copy the swvbaddin.zip file into the Visual Basic folder and swcsharpaddin.zip into the Visual C# folder. It is not needed to unzip these files.

Project templates folder

  • Start Visual Studio and create new project. Now C# and VB.NET project templates are available for selection.

VB.NET project template for SOLIDWORKS add-in{ width=500 }

If the following error is displayed when creating the project:

SolidWorksToolsWizard component load error

  • Navigate to the folder unzipped from the SOLIDWORKS API SDK.msi file and find the SolidWorksToolsWizard.dll

SolidworksToolsWizard.dll

  • This dll needs to be registered in the Global Assembly Cache (GAC). Navigate to %windir%\assembly folder in explorer and drag-n-drop the dll file into the folder

SolidWorksToolsWizard dll registered in GAC

If Access Denied error is displayed while registering the assembly in the GAC, you can use gacutil from Windows SDK and run it from the Command Prompt run as administrator gacutil.exe" /i "{FULL PATH TO solidworkstoolswizard.dll}"

Alternatively follow the How to: Install an Assembly into the Global Assembly Cache article on the guide of registering assembly in GAC.