none
Multiple .NETs and NGEN.exe RRS feed

  • Question

  • I have some PCs where I will need to install .NET 3.5 SP1 followed by .NET 4.

    Normally, I run ngen.exe executeQueuedItems immediately after installing any .NET Framework version to ensure there is no later inopportune resource hogging while assemblies are compiled that might affect users.

    When installing two different versions like this, is it possible to install v3.5 followed immediately by v4, or is it necessary for this compilation process to have finished from the first install before the second is done (whether compilation runs in the background or forced by me)?

    Secondly, presumably the ngen.exe in the v4 folder has to be used once v4 is installed?  Is it backwards-compatible though with previous .NET versions (eg when updates come out for them)?

    Thanks for your help.

    Monday, March 12, 2012 3:09 PM

Answers

  • Hi Andrew,

    Allow me to clarify:

    When you install .Net Framework 3.5 Service Pack 1 (full install package; it is known as 'KB951847'), the full installation package automatically installs .Net Framework Version 2.0, 3.0 and 3.5 Service Pack 1.  This can be verified by installing the KB951847 full install package on a computer that does not have any .Net Framework installed. 

    The installation of the additional KB's only installs patches for the installed Frameworks:

    1.) KB958481 applies a fix to .Net Framework Version 2.0

    2.) KB958483 applies a fix to .Net Framework Version 3.0

    3.) KB958484  applies a fix to .Net Framework Version 3.5 Service Pack 1

    Upon installing the full package above and then applying the three KB's listed here, you should be MBSA compliant for KB951847; that is, you shouldn't be prompted to install KB951847 any longer, via Windows Update.  However, you will be prompted to install additional/all relevent security fixes thereafter.

    I hope I've not confused you. 

    Tony


    Anthony Collazo


    • Edited by Anthony Collazo Wednesday, March 14, 2012 1:09 PM
    • Marked as answer by Cantoris Friday, March 16, 2012 9:55 PM
    Wednesday, March 14, 2012 1:08 PM
  • Hi Folks,

    It is recommended to honor restart requests to avoid any system instability. Restart requests happen because some running apps are using .NET files. I would recommend closing those apps before installing .NET Framework to avoid restart requests.

    You can use tools like Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653) to find out which tools are using .NET files. Any app that's using .NET components should be holding %windir%\system32\mscoree.dll file. So you can search which app is using this file in Process Explorer.

    Hope it helps!

    Varun


    Varun Gupta - MSFT

    • Marked as answer by Cantoris Friday, March 16, 2012 9:55 PM
    Thursday, March 15, 2012 2:43 AM

All replies

  • Cantoris,

    I've successfully deployed both 3.5SP1 and 4.0 onto Server 2003 and 2003 x64, one right after the other; later, I applied necessary security fixes.  All seems OK.  No errors.  Just take care to apply KB958481, 483 and 484  after installing 3.5SP1.   When you do a full install of 3.5SP1, the installer automatically installs 2.0, 3.0 and 3.5.  KB958481, 483 and 484 are for 2.0, 3.0 and 3.5SP1, respectively.  Thereafter, apply all other security fixes.

    Tony


    Anthony Collazo

    Wednesday, March 14, 2012 12:19 AM
  • Hi Cantoris,

    Welcome to the MSDN forum.

    It seems that your question is like this, if you can install .NET 3.5 SP1 after .NET 4 without some compatibility errors.  

    In fact, .NET 3.5 SP1 can be installed side-by-side with .NET Framework 4.0. They are totally different versions. You can choose either version when building your application.

    Additionally, please show us your OS version, some kind of .NET Framework is built in some system.

    We will get more information to help you with this.

    Best regards,


    Barry Wang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, March 14, 2012 7:09 AM
    Moderator
  • Hi Anthony,

    Thanks for this information.  I take it that if the .NET 3.5 SP1 installer asks for a reboot (which it usually does), I daren't defer this and install .NET 4 immediately to do one reboot afterwards?

    Interesting for you to mention those patches - have you found them critical as we've not routinely patched it before?

    Best wishes,

    Andrew

    Wednesday, March 14, 2012 10:50 AM
  • Hi Barry,

    No I'm not referring to their use side-by-side which I know is not an issue.  Rather I'm referring to the mechanics of installation of them both.  Do I have to reboot in between each install?  Ought I to run ngen.exe executeQueuedItems between them?  I'm also interested to know how the two versions of ngen.exe differ (one in the v2 folder and the other in the v4 folder) and how each should be used once a machine has v4 on.

    We're using a mix of XP SP3 and some XP SP2.

    Best wishes,

    Andrew

    Wednesday, March 14, 2012 10:53 AM
  • Hi Andrew,

    Yes, you can defer the reboot until after all 3 three steps are completed; that is:

    1.) Install 3.5SP1

    2.) Install 4.0

    3.) Install KB958481, 483 and 484 (this will satisfy the requirements for installing KB951847, which is 3.5SP1; just remember to install in the correct order, as I had described earlier).  The patches are critical, particularly if you're trying to achieve MBSA compliance for KB951847.

    I hope this information helps...

    Tony


    Anthony Collazo

    Wednesday, March 14, 2012 11:25 AM
  • Hi Tony,

    I'm a bit confused by your reference to KB951847 there, as it appears to be SP1 for .NET 3.5 ... but .NET 3.5 with SP1 was installed in step 1..?

    Thanks for your help.

    Andrew



    • Edited by Cantoris Wednesday, March 14, 2012 12:51 PM edit
    Wednesday, March 14, 2012 12:47 PM
  • Hi Andrew,

    Allow me to clarify:

    When you install .Net Framework 3.5 Service Pack 1 (full install package; it is known as 'KB951847'), the full installation package automatically installs .Net Framework Version 2.0, 3.0 and 3.5 Service Pack 1.  This can be verified by installing the KB951847 full install package on a computer that does not have any .Net Framework installed. 

    The installation of the additional KB's only installs patches for the installed Frameworks:

    1.) KB958481 applies a fix to .Net Framework Version 2.0

    2.) KB958483 applies a fix to .Net Framework Version 3.0

    3.) KB958484  applies a fix to .Net Framework Version 3.5 Service Pack 1

    Upon installing the full package above and then applying the three KB's listed here, you should be MBSA compliant for KB951847; that is, you shouldn't be prompted to install KB951847 any longer, via Windows Update.  However, you will be prompted to install additional/all relevent security fixes thereafter.

    I hope I've not confused you. 

    Tony


    Anthony Collazo


    • Edited by Anthony Collazo Wednesday, March 14, 2012 1:09 PM
    • Marked as answer by Cantoris Friday, March 16, 2012 9:55 PM
    Wednesday, March 14, 2012 1:08 PM
  • Hi Folks,

    It is recommended to honor restart requests to avoid any system instability. Restart requests happen because some running apps are using .NET files. I would recommend closing those apps before installing .NET Framework to avoid restart requests.

    You can use tools like Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653) to find out which tools are using .NET files. Any app that's using .NET components should be holding %windir%\system32\mscoree.dll file. So you can search which app is using this file in Process Explorer.

    Hope it helps!

    Varun


    Varun Gupta - MSFT

    • Marked as answer by Cantoris Friday, March 16, 2012 9:55 PM
    Thursday, March 15, 2012 2:43 AM
  • Hi,

    I guess I better play it safe.  Useful tip about which file to watch for handles on to avoid a restart.  :)

    Thanks.

    Andrew

    Friday, March 16, 2012 9:55 PM