Hi,
Currently one of the most common questions among the SOLIDWORKS API developers writing code in .NET (C# or VB.NET) is if add-ins should be ported/developed in .NET Core/NET6 or if it is still better to use .NET Framework.
In this video, I am explaining how to create SOLIDWORKS add-ins in .NET Core or .NET 6, how to resolve version compatibility, and what is the assembly strong naming why and when it should be used.
Thanks,
Artem
SOLIDWORKS add-ins in .NET Core/.NET6 and DLL versions conflict
SOLIDWORKS add-ins in .NET Core/.NET6 and DLL versions conflict
Thanks,
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
Re: SOLIDWORKS add-ins in .NET Core/.NET6 and DLL versions conflict
Regarding .net6:
If COM registration does not work, try adding the following property to the project file (i.e. into some <PropertyGroup>):
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Microsoft docs say about it:
If COM registration does not work, try adding the following property to the project file (i.e. into some <PropertyGroup>):
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Microsoft docs say about it:
Credit goes to Artem Taturevych for finding that out.The CopyLocalLockFileAssemblies property is useful for plugin projects that have dependencies on other libraries. If you set this property to true, any NuGet package dependencies are copied to the output directory. That means you can use the output of dotnet build to run your plugin on any machine.