9 Replies Latest reply on Jun 11, 2013 4:39 PM by Jim Sculley

    problems creating New AddIn

    Rene Daanen

      Hi,

       

      does anybody has problems with loading a new EPDM-AddIn from the dll's?

       

      I have created an AddIn which I'm able to run in debug-mode.

      The main dll is com-visible, all references are not. (as in the guides).

       

      Now when creating new AddIn, I get the error that none of the dll's implement the IEdmAddin -interface.

      Sometimes after trying few times, this error is gone, and I get the AddIn-interface (where you can see the selected DLL's).

      When pressing OK, I get the message that the clients have to restart their PC, so far so good,

      But then again I get a message that the IEdmAddin interface is not implemented.

       

      I now am at version 17 of my AddIn, and all previous versions did implement the AddIn. (although with some version, I had the same problems, but when struggling my way, and trying everything, it suddenly works sometimes).

      With my current version, I can't get it to work..

       

      Does anyone has similar problems? (and maybe even a solution?)

       

       

      Greetz

       

      Rene Daanen
      Cadmes B.V.

        • Re: problems creating New AddIn
          Tim Webb

          Hi Rene

           

          First, this is common! Second, don't worry, I am sure your addin code just needs a fresh start because either your GUID is bad, your iedmlib is not referenced properly, or your implements are bad. Third, you can fix it and when you do, EPDM will come alive...even more than normal.

           

          Disclaimer: I take no responsibility for any crazy-ness you create in your EPDM system using the API, I am merely offering insight about why the EPDM .net addin gives you this error.

           

          I had this problem when I first started writing addins. For a while I thought it was because I was developing in vb.net express but that wasn't the case. Express addins work just fine. EPDM is finicky about the addins which is annoying at times but it's workable.

           

          Keep the majority of your code. In fact, copy your class out to notepad or into a new project to save for later.

           

          You need Jeff Cope's EPDM .Net addin template to develop your code from. This will ensure your references and implements are set properly. Take a look at Jeff Cope's site. You really need to use his template for any of your EPDM API addin projects. Don't start a new project without it.

           

          http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/

           

          Last, install the template, start a new EPDM .Net addin, and copy in your original code. This will reset your GUID, your references, and your implements.

           

          Hope this helps.

          Tim

            • Re: problems creating New AddIn
              Rene Daanen

              Hi Tim,

               

              First of all, thanks for your reply.

               

              I will try, and let you know, but...

               

              This is not the answer I'd hoped for, as this will cost me lots of time.

              As my solution doesn't exist of just one class, but has lots of classes, forms etc in it, this will cost me again time to implement.

              And the worst thing is that I probably have to do it everytime that I create a new version.

               

              Of course the time will be less than the time needed now to try over and over again, so that's an improvement.

               

              What I would like to know, is WHY it goes wrong, then I probably can do something on the cause of it.

               

              I'm also in discussion with API-support, so if I find out anything more, other then your solution, I'll let you know.

               

              Once again,

              thanks for your reply.

               

              Greetz

               

              Rene Daanen

                • Re: problems creating New AddIn
                  Rene Daanen

                       Hi Lee,

                   

                  • Your addin should be written in .NET 3.5 or lower. EPDM doesn't support .NET 4 AFAIK. 
                    • I did (it registered OK in previous versions, that means not always without struggling, but finally it did)
                  • Try not include any method calls outside of what's expected in GetAddInInfo(). EPDM has thrown the error you're seeing if you're doing anything with the EPDM API besides accessing the IEdmCmdMgr interface in the GetAddInInfo() method.. So testing for group or user memberships or the like can cause issues. However, I believe this has been fixed in a recent service pack but it should be kept in mind. 
                    • I'm not doing that.
                  • Refactor. Right click on your class that implements the IEdmAddIn interface and rename. Rebuild and try adding it again.
                    • Sorry, didn't work also.

                   

                  BUT:

                  I did copy the files to a testmachine of a customer, where I was today. And there it went fine....

                  So I finally got my version.

                  But still I think I need to know why I can't do it on my own system.

                   

                  I also did delete almost all of the functionality in my solution (including all references, etc).

                  It appears that if I do have a (specific???) form in my solution, that I can't import it as an AddIn.

                  When I exclude the form in my solution, I can't import it.

                  When I include it again (not even use it from my main-class), I again am not able to import.

                   

                   

                  Story continues...

              • Re: problems creating New AddIn
                Lee CS Young

                Three things to check/try:

                1. Your addin should be written in .NET 3.5 or lower. EPDM doesn't support .NET 4 AFAIK.
                2. Try not include any method calls outside of what's expected in GetAddInInfo(). EPDM has thrown the error you're seeing if you're doing anything with the EPDM API besides accessing the IEdmCmdMgr interface in the GetAddInInfo() method.. So testing for group or user memberships or the like can cause issues. However, I believe this has been fixed in a recent service pack but it should be kept in mind.
                3. Refactor. Right click on your class that implements the IEdmAddIn interface and rename. Rebuild and try adding it again.

                 

                I know it is a PITA and this has caused me endless grief. Hopefully support gets back to you with a concrete reason why this happens so you can share it with the rest of the community.

                  • Re: problems creating New AddIn
                    Rene Daanen

                    Hi Guys,

                     

                    New info I'ld like to share with you.

                     

                    It seems like that if there are controls on a form, having the property 'ImeMode=NoControl', then I can't register.

                    If I manually delete this option (by searching for it in the '*.designer.vb'-file, and deleting the line, specifying this property), then I can register....

                     

                    I'm not sure whether this is/was my only problem, but till now it worked for two AddIns...

                     

                     

                    Greets

                     

                    Rene

                  • Re: problems creating New AddIn
                    Andries Koorzen

                    For anyone interested. I have come across this message again recently after upgrading to EPDM 2013 SP2.0.

                     

                    The resolution to the problem was to select .Net 4.0 as the target framework, and not .Net 3.5 as in the past. For some reason this fixed it. So .Net 3.5 is probably out the door because of Windows 8

                      • Re: problems creating New AddIn
                        Tim Webb

                        Thanks Andries, this is helpful.

                         

                        Do you know what could have changed in the framework?

                         

                        Tim CEPA

                        http://www.equivaq.com

                          • Re: problems creating New AddIn
                            Andries Koorzen

                            Hi Tim. I don't think that something changed in the framework per sé as much as EPDM itself is now dependent on the framework. This is pure speculation though and I stand to be corrected.

                             

                            Windows 8 comes preinstalled with .Net 4.0 by default without having .Net 2 -> .Net 3.5 installed.

                            My understanding is that .Net 4.0 is a brand new version of .Net, whereas 3.0, 3.5 and 3.51 were all 'expansions' of .Net 2.0 or layers on top of .Net 2.0. So to say what exactly changed in the newer version is difficult. I don't have that knowledge

                             

                            I know that SW does support EPDM on Windows 8, which means that they would have HAD to change something...but they would have also had to build in some form of backwards compatibility for the older versions of .Net.

                             

                            I run a development machine so I have all the frameworks installed by default, so it's always difficult to troubleshoot on my own machine. (It does make virtual machines more useful I must say!)

                             

                            My problems came specifically on a Windows 8 machine. The windows 7 machines were fine with the addin but I was having a lot of trouble getting the addin to register on a specific Win8 machine. It simply came up with the message that the addin does not implement IEdmAddin5 (which of course it did), so when I recompiled (as a test) against .Net 4 and it worked, it made me think that some black magic was doing its thing in the background

                             

                            It kinda takes me back a couple years to the security changes that came about in Windows XP SP3.0 / SW 2008 SP0.0. All I remember is that, as a reseller, that was a terrible year for us. We had to drive out to almost 70% of our user base to go and manually fix their machines because their IT departs refused to believe us when we said 'it's not as simple as it looks', and 'please use only the local admin to install' ....We didn't know what to expect with the .Net updates. Scaaaary stuff.

                             

                            It wasn't their fault, and neither was it SW. It was the combination of rights / windows updates / new antivirus updates / SW 2008 SP0.0 rights requirements / new version of .Net. Man that's I year I wish to forget

                             

                            I have a feeling Windows 8 applies similar rights. User account control is really difficult to control in Win 8. You can 'switch it off' but it is never really off. There are a lot more restrictions running in the background that the end user is never really aware of. Even in local admin mode. Combine this will a domain and an enterprise class data managment system and this cookie gets about as tough as they get. But hey... isn't that why we program? To make the computers our slaves mo ha ha ha....

                          • Re: problems creating New AddIn
                            Jim Sculley

                            Be careful with this.  EPDM has some specific requriements when using .NET 4.0.  See S-060899 for details.

                             

                            I was having a lot of strange errors, crashes and bizarre debugger behavior.  I spent two days chasing my tail until I set the EDMLib reference properties as shown in the knowledge base article.  After that, no problems.

                             

                            Jim S.