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.
Error 1: The dll is not a COM module.
This error is quite straightforward. The class that implements the IEdmAddIn5 interface must be COM visible. The best way to expose a .NET class as COM visible is as follows:
Making a .NET Class COM Visible in Visual Studio
You can achieve the same result by not using the ComVisible attribute and instead right-clicking on the active project > Properties > Application > Assembly Information… and then checking the box to make the assembly COM-Visible. However, this approach has the unintended consequence of making all public classes COM-Visible, which is not recommended for larger projects
Error 2 : Please Select at least one DLL implementing the IEdmAddIn5 Interface.
Every add-in must have a class that implements the IEdmAddIn5 interface. When your vault fails to find a class that implements IEdmAddIn5, this error message is displayed to the user.
Since the IEdmAddIn5::GetAddInInfo method gets invoked when you add the add-in to the vault, this error is unfortunately an umbrella for any unhandled exceptions thrown within the scope of IEdmAddIn5::GetAddInInfo.
Best Practice: As a rule of thumb, always wrap the implementation of IEdmAddIn5::GetAddInInfo in a try-catch block. Handle thrown exceptions properly by logging them and/or showing a message box to the user installing the add-in.
When logging exceptions, use Exception.InnerException to log all inner exceptions. The innermost exception can sometimes provide a more meaningful explanation of the root cause of the outermost exception.
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.
Error 3 : The add-in ‘<Path>’ cannot be installed since it returned an invalid required version SOLIDWORKS PDM version from its GetAddInInfo Method
This error is self-explanatory. The specified version in the EdmAddInInfo parameter of the IEdmAddInInfo::GetAddInInfo method has a major and/or minor version that is lower than the hosting SOLIDWORKS PDM Professional vault’s version. The only way to fix this is to ensure that the minimum version specified in your code is either equal to or higher than that of the target PDM vault.
Error 4: 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 DLLs for security purposes on some systems. If the DLL files are blocked, the following error occurs:
Error Message: “The archive server could not open the Windows Registry”
Solution: 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 and 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.
Error 5: 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.
Message: “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 this tool.”
This error indicates that you lack the necessary 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.
Solution: The screenshot below shows the setting that the administrator must enable to grant the user the necessary permissions.
Permission Settings: Ensure that the administrator reviews and modifies the user permissions accordingly to allow access to add-in administration tools.
2 Comments
Martin van Stigt Thans
Very helpfull!
Amen Jlili
Thanks Martin. Glad it’s very helpful.
Comments are closed.