SolidWorks Add-in (.NET C#) appears in Add-ins list but automatically unchecks when activated

 

I am developing a SolidWorks Add-in for SolidWorks 2026 x64 using:

  • C#
  • .NET Framework 4.8
  • Visual Studio 2022
  • Class Library project
  • Platform: Release | x64

The add-in appears correctly in Tools → Add-ins, but when I try to activate it, the checkbox immediately unchecks itself and the add-in does not load.

What I verified

  1. COM registration

    • The CLSID exists in:
    HKLM\\Software\\Classes\\CLSID\\{GUID}
    • InprocServer32 = mscoree.dll
    • RuntimeVersion = v4.0.30319
    • CodeBase points to the correct DLL (Release x64).
  2. SolidWorks Addins registry

    HKLM\\SOFTWARE\\SolidWorks\\Addins\\{GUID}

    Exists with:

    • Title
    • Description
    • Default value = 1
  3. COM instantiation works manually

From PowerShell (non-admin):

New-Object -ComObject "Automa.SwAddin.SwAddin"

This successfully creates the COM object.

  1. Project settings
  • Build configuration: Release
  • Platform: x64
  • Register for COM interop enabled.

Issue

When SolidWorks attempts to load the add-in:

  • The checkbox immediately unchecks
  • Constructor is not executed
  • ConnectToSW() is not called
  • No visible error message appears

Question

What could cause SolidWorks to fail loading a .NET COM Add-in that:

  • is correctly registered
  • can be instantiated manually via COM
  • appears in the Add-ins list
  • but immediately disables itself when activated?