Below is a compiled list of the most notoriously common errors that you may encounter while deploying add-ins to a SOLIDWORKS PDM Professional vault. Proposed solutions are also listed under each error.
The dll is not a COM module.
This error is pretty straight-forward. The class that implements the IEdmAddIn5 interface must be COM visible. The best way to expose a .NET class as com visible is like follow:
You can achieve the same result by not using the ComVisible attribute and righ-clicking on the active project > Properties > Application > Assembly Information… and then checking make assembly Com-Visible. This has the unintended consequence of making all public classes COM-Visible so this is not recommended.
Please Select at least one DLL implementing the IEdmAddIn5 Interface.
Since the IEdmAddIn5::GetAddInInfo gets invoked when you add the add-in to vault, this error is unfortunately an umbrella for any unhandled exceptions thrown within the scope of IEdmAddIn5::GetAddInInfo.
👍 As a rule of thumb, always wrap IEdmAddIn5::GetAddInInfo‘s implementation in a try catch block and handle thrown exceptions properly by logging them and/or showing a messagebox to the user installing the add-in.
Using Exception:InnerException, log all inner exceptions since the inner most exception can sometimes give you a more meaningful explanation of the root cause of your the outer most exception.
The add-in ‘<Path>’ cannot be installed since it returned an invalid required version SOLIDWORKS PDM version from its GetAddInInfo Method
This error is pretty self-explanatory. The specified version in EdmAddInInfo parameter in the IEdmAddInInfo::GetAddInInfo has a major and/or a minor version that is lower to the hosting SOLIDWORKS PDM Professional vault’s version. Only way to fix this is to make sure that the minimum version specified in your code is either equal or higher than the one of the target PDM vault.
The archive server could not open the Windows Registry
If you copy or download the API add-in DLL files from another computer, the Windows security policy might “block” the DLL for security purposes on some systems. If the DLL files are blocked, the following error occurs:
To add these add-in DLLs to the vault, you must first unblock them. Follow these steps:
- In Windows Explorer, right-click the DLL file > select ‘Properties’.
- Select the ‘General’ tab.
- If the file is blocked, the following security warning appears: ‘The file came from another computer and might be blocked to help protect this computer.’
- Confirm that the file originates from a trusted source, and then click ‘Unblock’.
- Click ‘OK’ to close the properties dialog box.
- Repeat these steps for any additional DLL files that were copied or downloaded from the same source.
You do not have permission to use this tool. Please ask the system administrator to grant you permission if you feel that you should be able to use tool.
You do not have permissions to administrate (install, update, debug or remove) add-ins from this vault. The system administrator is the only one who can grant you that permission. The screenshot below shows the setting that the administrator has to enable in order to grant the user said permission.