solidworks-api
solidworks-api copied to clipboard
Not able to register the Addin
I am not able to register the dll because of Solidworks.interop.swpublished in the references of the project but as I remove the reference from the project I am able to register the dll but the addin is not loaded in solidworks neither able to debug it through visual studio
Do you have the DLL property "Embed interop types" set to Yes/True by accident? It should be set to No.
I have set it to "No" But I have begin my work using another approach Thanks for your help!!!!
Hello, Have you fixed the issue of swpublished dll ? I also the all the solidworks.interop.xxxx dll embed interop type to false, it doesn't work either.
There is no known problem with the DLLs and "it doesn't work" isn't enough for us to help you. Please share a small project that lets someone reproduce the issue and share the exact errors you're seeing.
I can think of three things that can go wrong:
- Embedding the DLLs is set to true/yes. You have checked for that.
- You have added DLLs to your own project that are not from SW2021. SolidDna references the SW2021 DLLs and you should too. See https://github.com/angelsix/solidworks-api/issues/118
- You have no GUID attribute added to your AddInIntegration class. I cannot find the issue where we talked about this.
Hello, I have also the same problem with the solidworks.interop.swpublished.dll. I had installed SW2018 (now deinstalled) and now I want update to SW2021 (installed). So i have test the NuGet. I get this information from the registration:
RegAsm: warning RA0000: If you register an unsigned assembly with the / codebase option, the assembly may interfere with other applications installed on the computer. The / codebase option should only be used with signed assemblies. Give the assembly a strong name and reregister it. RegAsm: error RA0000: The file or assembly "SolidWorks.Interop.swpublished, Version = 28.1.0.74, Culture = neutral, PublicKeyToken = 89a97bdc5284e6d8" or a dependency on it was not found. The assembly manifest definition found does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The used Version of SolidWorks.Interop.swpublished is 29.4.1.1! 28.1.0.74 is in SW2020. I also deleted it in the reference, this has no effect either.
Link to my test project according to the AngelSix video https://www.youtube.com/watch?v=r8e3xFlmZ_o https://github.com/elincooper/SW2021AngelSixNuGetTest
Is it possible, that SW2021 references are not yet implementet in the NuGet package?
If I replace the SW2021 references in the AngelSix.SolidDNA project and don't use the NuGet package, it works fine.
Thanks for your help.
You are correct. The SW2021 DLLs are not yet in this NuGet package.
They are in my fork, where I also made some bug fixes that are lingering here as PRs. I also made some big changes, so I'll add some documentation first. https://github.com/CAD-Booster/solidworks-api
Thanks for the test project. I found out two things:
- You can get it to register by adding a reference to the SW2020 Published dll.
- You can get it running by also adding all other SW 2020 dlls.