App-V 5.0: Sequencing Visual Studio 2012

The sequencing of Visual Studio 2012 does NOT seem to have been successfully accomplished by many people (at least not online that I can find!).  This recipe is a conglomeration of tips, tricks, fixes, and other recipes found on the web.  Hopefully it works for you too!

Notice: Visual Studio takes a long time to sequence.  At times, it will appear that the sequencer is ‘hung’.  In reality, this is normal so DO NOT terminate the window or otherwise start over.  Just allow for time (even up to 15 minutes) for the processing to complete.  An additional reference for virtualization can be found at http://social.technet.microsoft.com/Forums/en-US/7e93e525-31ed-43fc-8415-88a12766d2c2/how-to-sequence-visual-studio-2012-in-microsoft-application-virtualization-46-sp2

Prerequisites

  1. Pre-download the most recent Visual Studio 2012 Update
    1. Save into the source files
    2. Extract files to a folder in the AppV source files
    3. Update the CustomSetup.bat to call this
  2. Ensure VM has at least 45 GB disk
  3. Download the MVLS edition of VS then copy the installer and all subdirectories to a local folder
  4. Create an AdminDeployment.xml with SharePoint tools and SQL to not install (such as code snippets below)
         <SelectableItemCustomization Id="SharepointTools" Hidden="no" Selected="no"/>
         <SelectableItemCustomization Id="SQL" Hidden="no" Selected="no" />
  5. Install Microsoft .NET Framework 4.5 on the Sequencer machine. Using Microsoft Update, install all updates for .NET Framework 4.5
  6. Install IIS Express 8 (from iisexpress_8_0_RTM_x64_en-US.exe)
  7. Open an Administrator Command Prompt and run:
    1. C:\Windows\microsoft.net\framework\v4.0.30319\ngen.exe executeQueuedItems
    2. C:\Windows\microsoft.net\framework64\v4.0.30319\ngen.exe executeQueuedItems
  8. On Windows 7, disable the services:
    1. “Microsoft .NET Framework NGEN v4.0.30319_32”
    2. “Microsoft .NET Framework NGEN v4.0.30319_64”
  9. Open Regedit.exe, change the Permissions of the two following registry keys, granting Full Access to the Administrators group
    1. HKLM\System\CurrentControlSet\Services\DcomLaunch
    2. HKLM\System\CurrentControlSet\Services\RpcSS
  10. Restart Windows
  11. Now is a good time to make a snapshot/checkpoint :-)

Sequencing

vs12-01

CustomSetup.bat will do the following:

  1. Unattended install of the MVLS copy of Visual Studio 2012 Pro
  2. Disable prompt to download/install local help files on software first run
  3. Install help files

"%~dp0vs_professional.exe" /passive /adminfile "%~dp0AdminDeployment.xml"

:: Disable prompt to download/install local help files on first run reg add HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Help /v
DisableFirstRunHelpSelection /t reg_dword /d 1 /f

:: Install help files
:: Note this is disabled due to space constraints but could potentially be enabled
:: "C:\Program Files (x86)\Microsoft Help Viewer\v2.0>hlpctntmgr.exe" /operation install /catalogname VisualStudio11 /locale en-s /sourceuri \\ServerShareWhatever\VS2012Documentation\helpcontentsetup.msha

:: Fix for IEXPlorer
reg add HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE /v /T REG_SZ /d """c:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE"""
reg add HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE /v /T REG_SZ /d """c:\Program Files (x86)\Internet Explorer"""

vs12-02

Visual Studio 2012 Professional

C:\Program Files (x86)\Microsoft Visual Studio 11.0

vs12-03

After the install completes, do not close the sequencer, but just restart Windows and login.  The sequencer will resume.

Run the latest update that was downloaded as part of the prerequisite steps

vs12-04

After the install completes, do not close the sequencer, but just restart Windows and login.  The sequencer will resume.

Locate the Developer Command Prompt and do a Run as Admin

vs12-05

Run regedit.exe

vs12-06

Delete the value of SetupCommandLine in HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0

vs12-07

Done installing

vs12-08

Do not run anything

vs12-09

vs12-10

Stop Now

vs12-11

vs12-12

Locate and delete the following in the VFS

  1. [{AppVPackageRoot}]\Common7\IDE\Extensions\random.folder\package\services\digital-signature\_rels
  2. [{AppVPackageRoot}]\Common7\IDE\Extensions\random.folder\_rels

vs12-13

vs12-15

(Optional step, but advisable for Standalone App-V 5.0 Infrastructure)

Add the .NET Framework 4.5, IIS Express 8.0 installers, and custom install.bat script (which just installs both items) into the scripts folder

vs12-14

Now save your package because it’s ready for deployment!!

If you did the optional step above, then edit the saved Deployment.xml file to run a user script for installing IIS Express 8.0 and .NET 4.5 locally

<UserScripts>
   <PublishPackage>
      <Path>cmd.exe</Path>
      <Arguments>/c [{AppVPackageRoot}]\..\Scripts\install.bat</Arguments>
      <Wait RollbackOnError="true" Timeout="600"/>
   </PublishPackage>
</UserScripts>

Additional Notes

When starting the software for the first time, select to use General Development Settings and to not install local help.

vs12-16

4 thoughts on “App-V 5.0: Sequencing Visual Studio 2012

Add yours

  1. Hi,
    Excellent work, interesting to see the variations between your recipe and the 4.6 version.
    Out of interest, did you sequence with Office 2013 installed on the sequencer?
    I find that if I revert back to a snapshot during the installation or configure windows, I can launch Visual Studio successfully. But once I proceed through to the installation report it will no longer launch. I just get the splash screen followed by “Invalid License Data – Reinstall Required”.
    Following the recipe to the letter (not launching anything during either of these windows as directed) I get to the end of the sequence and save the package and get the same error on launch running the package locally: “Invalid License Data – Reinstal Required”… Did you come across this at all?
    Cheers,
    Stefan

    1. I did not have office on the sequencer and the target systems had office 2010 with also the O2k10 deployment kit as well. The invalid licence key situation sounds like not having used the volume licence from your MVLS site. At least from what I’ve seen.

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑