22 Replies Latest reply on Sep 28, 2014 7:00 PM by Ryan Fisher

    Preparing SolidWorks for first use message dialog with add-in

    scott cleveland

      I have an add-in the has been used by our clients without this issue for almost 2 years without this problem. It seems now w/ SW 2010 sp 3.1 and sp 4, that this Preparing SolidWorks for first use message/dialog will come up when SolidWorks is started w/ the add-in set for load on start up. When it comes up, it can sit there for 20 minutes, and if you cancel it, it will crash SW, and come up again when SW is restarted. If the add-in is not set for load on start up, you do not get the dialog. The add-in is .net/C# framework 2.0 - I have changed framework to 3.5 and still get dialog. I have seen postings similar to this and wonder if anyone knows a fix. It seems to happening more on Winodws 7, 64 bit. with latest service packs.

        • Re: Preparing SolidWorks for first use message dialog with add-in
          Jesse Seger

          This has little to do with the .NET Framework version.  It has to do with Visual Studio Tools for Applications.  It must configure itself on first use.  you have seen posts on this because VSTA is new for 2010.

           

          I'm not sure why your add-in is requiring this to run.  I'll keep an eye out to see if I come across anything.

          • Re: Preparing SolidWorks for first use message dialog with add-in
            Garrett Klein

            I ran across this last week, unfortunately the end result was reformating my computer. I tried reregistering using ngen, uninstalling, resetting my registry, repairing. Eventually I decided it was more effiecient for me to stop messing with it. Id like to know if you do come up with a solution.

            • Re: Preparing SolidWorks for first use message dialog with add-in
              Luke Malpass

              Sounds unrelated to what you are describing and likely not directly related to those lines of code.

               

              Try creating a blank add-in that just creates a taskpane in SW so you know it is running, and nothing else, and see if it causes it.

               

              Are you using a stand-alone app that hooks into SW (in which case this isn't an "add-in" by definition). In which case yes VSTA will likely have some form of involvement in the binding process when you cast it to a runtime callable wrapper.

               

              Luke Malpass

              AngelSix (SolidWorks Tutorials and Books)

              BatchProcess

                • Re: Preparing SolidWorks for first use message dialog with add-in
                  Eduardo Brites

                  I have a similar problem, everytime I install the latest Windows Updates (Windows7 32-bits) If I run SW2010/SW2011 from Visual Studio, that message shows up for about 2/3 hours... The problem does not occur if I run SW manually.

                   

                  The Api support said I needed to reinstall .NET Framework which I did, yet, the problem persists...

                   

                  I would like to know a better workaround than simply waiting 2/3 hours...

                    • Re: Preparing SolidWorks for first use message dialog with add-in
                      scott cleveland
                      This solved the problem for us:

                       

                      ======================================================

                       

                      SolidWorks  uses .NET technology and to gain maximum performance the SolidWorks  components based on .NET are compiled to native dlls at installation  time.
                      Depending on the characteristics of the hardware and the  machine load this step may take a few minutes longer than the actual  SolidWorks installation.
                      To ensure correct functioning SolidWorks  2010 SP3 and later will wait for that compilation step to complete,  showing the message "Preparing SolidWorks for first use. This may take  several minutes."

                       

                      In case the message does not disappear within a  reasonable period of 2 hours, please open a DOS command prompt,  navigate to one of these folders:
                      Use "cd <folderpath>"

                       

                      32bit machine:
                      C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
                      x64 machine:
                      C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727

                       

                      and type the following command:

                       

                         ngen.exe executeQueueditems

                       

                      This should cause .NET to compile all .NET components that have been  queued up as soon as possible instead of in the background when the  machine is idle.
                      The .NET components in the queue may come from SolidWorks, 3rd party applications based on .NET, and the .NET framework itself.

                       

                      On a 64-bit machine, please invoke the above command from both a 32-bit and a 64-bit DOS command prompt.

                       

                      I have restarted SW after this, waiting appr. 1-2 hour and then it wa working.

                       

                      Regards,

                      Alain

                      • Re: Preparing SolidWorks for first use message dialog with add-in
                        Kent Keller

                        I experienced the same problem directly after having Microsoft Office 2010 installed on my computer.  From that moment on, this problem appeared.

                         

                        Kent

                          • Re: Preparing SolidWorks for first use message dialog with add-in
                            scott cleveland

                            Kent:

                             

                            We have run into the problem numerous times, and it usally brought on by sometihng OS or .NET version install/Service Pack update/install related. If you following the instructions below, and after completing them, start SW and give it an hour or so it should finally start up 100%.

                             

                            Scott

                             

                             

                             

                            ======================================================

                             

                            SolidWorks   uses .NET technology and to gain maximum performance the SolidWorks   components based on .NET are compiled to native dlls at installation   time.
                            Depending on the characteristics of the hardware and the   machine load this step may take a few minutes longer than the actual   SolidWorks installation.
                            To ensure correct functioning SolidWorks   2010 SP3 and later will wait for that compilation step to complete,   showing the message "Preparing SolidWorks for first use. This may take   several minutes."

                             

                            In  case the message does not disappear within a  reasonable period of 2  hours, please open a DOS command prompt,  navigate to one of these  folders:
                            Use "cd <folderpath>"

                             

                            32bit machine:
                            C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
                            x64 machine:
                            C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727

                             

                            and type the following command:

                             

                               ngen.exe executeQueueditems

                             

                            This  should cause .NET to compile all .NET components that have been  queued  up as soon as possible instead of in the background when the  machine  is idle.
                            The .NET components in the queue may come from SolidWorks, 3rd party applications based on .NET, and the .NET framework itself.

                             

                            On a 64-bit machine, please invoke the above command from both a 32-bit and a 64-bit DOS command prompt.

                             

                            I have restarted SW after this, waiting appr. 1-2 hour and then it wa working.

                      • Re: Preparing SolidWorks for first use message dialog with add-in
                        John Connors

                        I too have had the same problem.  I've reloaded Microsoft.NET several times and nothing has worked.  I've contacted my reseller but he only sent the Knowledge Base response, which doesn't give a permanent solution. 

                         

                        My fix was to write a batch file that I run from my desktop before starting Solidworks.  It takes a few minutes to complete, but once done Solidworks (2012 SP3) starts up immediately.  I've found that I need to do this after each computer shutdown or log off.

                         

                        I can't believe SW hasn't figured out a permanent solution???  I'm very disappointed.

                         

                        The batch file is below.

                         

                        I hope this helps

                         

                        Best Regards,
                        John

                         

                         

                        cd c:\windows

                        cd microsoft.net

                        cd framework64

                        cd v4.0.30319

                        ngen.exe executequeueditems

                        NGEN.JPG

                        • Re: Preparing SolidWorks for first use message dialog with add-in
                          Christopher Estelow

                          Just an FY.......I just had this problem this morning with Version 2012 and the fix that Scott Cleavland gives above worked for me.  Thanks Scott!!

                           

                          Regards,

                          Chris

                          • Re: Preparing SolidWorks for first use message dialog with add-in
                            Dan Bovinich

                            This problem started today, my co-worker did not change anything, SW was working fine for at least a year.  If I logged into my co-worker's machine, SW would start fine.

                             

                            I had a SW VAR AE instruct me to do the NGEN from (admin) command line repair. In addition to the NGEN command line repair, we also and we went into the Window registry to give him full rights to several SW folders. We checked my co-worker's rights and he had full ADMIN rights. After all of the above repair - no change, still had the problem.

                             

                            The only thing that did change to his computer, before this happened, is one of those Microsoft updates (20), the updates were not negotiable, they were automatic. I can't see why that would be the root cause, because my computer and (3) other also had the MS update and our SW opened fine with no issues.

                             

                            I tried the Andries Koorzen solution above, that worked.   I am not sure what else that program does, but at least we can use SW now.

                             

                            SW2012, SP5, 64bit

                             

                            Thanks Andries!

                             

                            Dan Bovinich

                            • Re: Preparing SolidWorks for first use message dialog with add-in
                              Ryan Fisher

                              If anyone is still unable to get these solutions to work, I have one that may help.

                               

                              I am still on XP at home and I recently upgraded my installation to 2012 so I can do some work from home. It was getting stuck on the "preparing for first time use" window as others have posted. I had wiped out the previous version of SWX all >NET and Visual Studio items so I could do a complete clean install. Then that happened.

                               

                              I tried the NGEN fix in above posts but it wouldn't do the trick. In my installation when running the "services.msc" snap in I noticed I only had one item in it. It was the MS .NET Optimization service.

                               

                              Since it was the only one in there I thought what the heck - might as well give it a go. Sure enough soon as I clicked "Stop Service" the command completed in SWX and now I have use of the program again! Wahoo!! So by way of attempting other known solutions I have found another one!

                               

                              -Ryno

                               

                              SWX Fix Stop Service.jpg