July 23, 2008
2:41 am

Jeffrey Snover, Windows Management Partner Architect, reports that —”in V1, we had a problem which caused our assemblies to not get ngen’ed during installation.  If you don’t know what “ngen” is, don’t worry - you don’t need to.  All you need to know is that we didn’t do the step that makes things go fast on your machine.”

Below is the content of the Update-GAC.ps1 script that I run whenever I install a new version of PowerShell. Our installation is supposed to ngen the assemblies in the background. If that works, it doesn’t work fast enough for me. Also I’ve seen lots of examples where people run this script long after their install and things get a TON faster so …. The install team is looking into the issue but until then:

Set-Alias ngen @(dir (join-path ${env:\windir} "Microsoft.NET\Framework") ngen.exe -recurse |sort -descending lastwritetime)[0].fullName[appdomain]::currentdomain.getassemblies() | %{ngen $_.location}

Related Posts:

No followup yet

Leave a Response

Comment Preview
« Hyper-V Constrained Delegation of Authority - Remote Mounting of ISO with Management ConsoleSpice up HTML select boxes with graphics »
Feed Icon

Subscribe via RSS or email: