Categories
Uncategorized

Preparing SolidWorks for first use

Today, when starting (debugging) SolidWorks from Visual Studio 2010, the following message was displayed

“Preparing SolidWorks for first use”

and it looked as though SolidWorks (2012) had hung … so cancelled the dialog, and quit VS2010.

I thought it must have something to do with the addin application I’m currently developing and started to investigate further.

The last time I’d seen this message was after first installing SolidWorks – which seems like the right time – so perhaps a corrupted registry setting ?

Couldn’t find anything obviously wrong.

Tried starting SolidWorks from the desktop – everything is fine, and the addin loads and works too.

The only other thing that had happened since yesterday was the installation of a Microsoft Windows update which included various updates for Microsoft Office 2010, Security update for Windows 7 x64 and a couple of security updates for Microsoft .NET Framework 4 and Microsoft .NET Framework 3.5.1 could anything here be related ?

Time for a quick search on the SolidWorks Support Knowledge Base which revealed that SolidWorks components based on .NET technology are compiled to native DLLs at installation time (from version SW 2010SP3 onwards) and displays this message during the compilation step. It also mentioned that it could take up to 2 hours!! to complete this step.

The Native Image Generator (Ngen) from Microsoft appears to be responsible for the compilation step. Read details about ngen.exe at

http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.110).aspx

It’s possible that the Windows Update may have triggered the need for this re-compilation step.

A quick check is to disable any running ngen service(s) (there may be more than 1 running). On my machine there were 2 running services

Microsoft .NET Framework NGEN v4.0.30319_X64

and

Microsoft .NET Framework NGEN v4.0.30319_X86

I stopped these services and re-tried starting SolidWorks from VS2010 – and the problem has gone away!