If you are developing a SOLIDWORKS add-in as a .NET Framework (version 4 and older) application, you will need to register your SOLIDWORKS Add-in DLL so that SOLIDWORKS can find it and load it. This guide explains how to register a SOLIDWORKS add-in DLL (64-bit) and covers manual registration for developers who will register from the command-line program.
Disclaimer: This method will only work for the old legacy .NET Framework 2, 3, and 4.
Step-by-Step Instructions (64-bit or Any CPU)
- Open Command Prompt with Administrator permissions. This is necessary to have admin permissions to make changes to the system registry.
- Navigate to the folder where your DLL is located. Use the cd command to change your current directory in the Command Prompt to the location where the compiled add-in DLL is located.
cd <DLL FOLDER>.dll - Run the .NET registration tool. You will use the .NET registration tool RegAsm.exe, which is a part of the 64-bit .NET Framework. The command looks like the following:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /codebase <DLL FILENAME>.dll - Confirmation. If successful, you will see a response that states the following message,
“Types registered successfully.” - Warning: You may also see this response,
“Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications…”
This is normal during development. You should, when in production, use a strong name key to sign your assembly.
What About 32-bit Registration?
What About 32-bit DLLs?
You are only required to register 64-bit DLLs for all of today’s current versions of SOLIDWORKS, as all of them run as SolidWorks 64 bit applications. The only time you would, in fact, have to register a 32-bit DLL is if you’re targeting SOLIDWORKS 2013 or earlier. The process is the same, but uses the 32-bit version of RegAsm.exe:
|
1 |
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe |
Unregistering The Add-in
If you want to remove the add-in (e.g., cleaning up or switching between builds), just run:
|
1 |
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /unregister PDMPublisher.dll |
Still Need Help?
At Blue Byte Systems, we develop and maintain professional SOLIDWORKS add-ins for automation, analysis, UI enhancements, and system integration. If you are experiencing problems or require a dependable API resource, we are here to assist you with guides like how to register a SOLIDWORKS add-in DLL (64-bit).
👉 Contact us today to find your custom solution!
