3 Replies Latest reply on Jan 6, 2015 11:18 AM by John Howell

    2014 SP5 AddIn won't load...

    John Howell

      Good day!


      Just upgraded to SolidWorks 2014 SP5 (from 2011 SP0).


      Long standing functional VB.NET AddIn won't load... Compiles but won't load in SolidWorks... No errors, just nothing happens, and the AddIn does not come out 'loaded'.


      Worked fine when tested on 2014 SP4 a few weeks ago.


      I noticed when replacing the SolidWorks references in VS I had to change the .NET Target Version from 2.xxx. I went with .NET 4.0? Good idea, bad idea - I'm not a full time programmer.


      Anything else fundamental with the AddIn change, and/or any other ideas why it won't load? The next step is stripping everything out until it works or start fresh with a new template... Hoping there is a better solution.

        • Re: 2014 SP5 AddIn won't load...
          John Howell

          The problem is resolved as follows:


          1. Downloaded the 2014 API SDK and installed it.


          2. Started a new VS SWAddIn project based on the new SolidWorks template.


          3. Compared everything relevant (.NET version, dependencies, Register and Unregister code, etc...).


          Found significant differences in the Post Build Events text so I copied the newer code to my project, which resulted in 1) the AddIn loading properly in SolidWorks and 2) a large *WHEW*.


          I also replaced all the SolidWorks 2011 references with 2014 references, which necessitated updating the project to .NET 4.0 (edited from 2014).


          All is well, for now.

          • Re: 2014 SP5 AddIn won't load...
            Keith Rice

            Glad you got it working. Next time, be sure to specify between the add-in being present in the Tools-->Add-in list (but not loading when you click the checkbox next to it) versus not present at all in Tools-->Add-ins. Those are two separate problems. It sounds like in your case, the add-in wasn't present at all? This will occur if the DLL never got properly registered.


            The post-build event in the Visual Studio project is only intended for registering the DLL while you are debugging it. To register your DLL for production use, you should be using a .bat file or an installation package, especially if you plan on distributing the add-in. To learn how to use .bat files to accomplish this, see my post here.



            SolidWorks API Tutorials

              • Re: 2014 SP5 AddIn won't load...
                John Howell

                Hi Keith. Thanks for your reply.


                In my case the AddIn was showing up in the available list...


                I suspect the post build events were causing the issue on my debug machine and it may have been the .NET 4.0 (not 2014, as I wrote previously) 'update' I did to the project (necessitated by the updated SolidWorks reference) that resolved the production issue because once I got the debug machine working the Setup project built and installed in the production environment.