Installing NuGet package

Select Manage NuGet Packages… command from the context menu of the project in Visual Studio

Manage NuGet Packages... command in the project context menu
Manage NuGet Packages... command in the project context menu

Search for CodeStack.SwEx in the search box. Once found click Install button for the required framework.

CodeStack.SwEx.AddIn NuGet package
CodeStack.SwEx.AddIn NuGet package

This will install all required libraries to the project.

Preparing the project

Set the Embed Interop Types to False for the SOLIDWORKS Interop libraries as shown below.

Disabling the option to embed interop types for SOLIDWORKS interops
Disabling the option to embed interop types for SOLIDWORKS interops

Check the Register for COM Interop option in project properties:

For C# project this option can be found in Build tab:

Register for COM Interop option in C# project
Register for COM Interop option in C# project

For VB.NET project this option can be found in Compile tab:

Register for COM Interop option in VB.NET project
Register for COM Interop option in VB.NET project

Supporting multiple versions of the SwEx framework

Methods signatures and behaviour of SwEx framework might change in new versions. SwEx libraries are strong named which prevents the compatibility conflict in case several add-ins loaded in the same session of SOLIDWORKS referencing different versions of framework.