Fix missing Visual Studio SOLIDWORKS API SDK project templates

Edit ArticleEdit Article
Comments
See more issues and resolutions

Symptoms

SOLIDWORKS API SDK installation process
SOLIDWORKS API SDK installation process

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
Unzipping .msi package

  • 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
Projects and Solutions options in Visual Studio

  • 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
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
VB.NET project template for SOLIDWORKS add-in

If the following error is displayed when creating the project:

SolidWorksToolsWizard component load error
SolidWorksToolsWizard component load error

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

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
SolidWorksToolsWizard dll registered in GAC

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

Notifications

All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.


Product of Xarial Product of Xarial