Update about J# redistributable package installation in VS 2005 setup

Now that Visual Studio 2005 beta 2 has been released, I have gotten a handful of questions about my blog post from last August explaining why VS setup forces the user to install the J# redistributable package when they don't intend to do J# development in the IDE.  In that blog post I explained the reasons behind the behavior in VS .NET 2003 setup and also stated that it was being changed in VS 2005.  Some folks have noticed that running VS 2005 beta 2 setup and unchecking the J# language tool item in the setup selection tree still results in setup installing the J# redistributable package.  A couple of other folks wondered why there wasn't a separate check-box in the setup selection tree to turn off the J# redistributable package.

Back when I wrote that blog post, the code hadn't yet been written to allow us to make the J# redistributable package an optional component, so I couldn't elaborate on exactly how VS 2005 setup would work with respect to that component because it was only a conceptual design.  Now that the code has been implemented, I wanted to explain exactly how VS 2005 setup controls the installation of the J# redistributable package.

First of all, the J# redistributable package is one of a group of components that can be thought of as "feature-dependent chained components."  Other examples of this type of component include the VS Tools for Office Runtime and the .NET Compact Framework.  All of these components are required prerequisites for specific features that the user can select or deselect in the VS setup selection tree.  Because they are required, we decided to not show them as items in the tree themselves or provide checkboxes to allow the user to uncheck them.  The only indication setup gives that they will be installed is in the UI on the install progress page.

The tricky part about these feature-dependent chained components is that there is no way to tell in setup UI which feature(s) require the component.  In the case of the J# redistributable, most people would expect that it is only needed by the J# language tools and are naturally surprised if they unselect J#, click Install Now and still see the J# redistributable package in the list of components to be installed.

What happens behind the scenes is that setup looks at data listed in the file baseline.dat (which is located in the setup subdirectory on the VS 2005 DVD or CD1).  That file has a set of attribute/value pairs for each component that setup might need to install.  For example, the J# redistributable package is listed as [gencomp68] in baseline.dat in VS 2005 beta 2.  Components that are feature-dependent chained components have their ComponentType value set to 3 and also contain an attribute called DependentFeatures.  The value of the DependentFeatures attribute is a semi-colon separated list of GUIDs, and each GUID represents a possible FeatureID in the Feature table of the VS MSI (vs_setup.msi).  When the user presses Install Now in VS setup UI, the setup engine processes each of those FeatureID values and determines whether or not they were selected in the setup tree.  If at least one of those features was selected, setup will add the feature-dependent chained component to the list of items to be installed.

In the case of the J# redistributable, if you use Orca and manually search for each of the DependentFeature GUIDs in vs_setup.msi, you will see that Visual Web Developer also requires the J# redistributable (because you can create web projects using J# in addition to VB and C#).

In the case of the J# redistributable package, there is also a secondary check in the VS IDE.  So if you have J# and/or Visual Web Developer installed and then uninstall the J# redistributable package, you will see an error message indicating that the J# redistributable was not found.  Dismissing that will give a secondary error message stating that the Visual J# Language Service Package has failed to load.  If you press Yes to this package load failure dialog, the IDE should not attempt to load the Visual J# Language Service Package in the future and you should not see these errors when launching the IDE anymore.

In summary and to make a really long story short, if you uncheck both J# and Visual Web Developer during VS 2005 beta 2 setup, you should not see the J# redistributable package installed.


Comments (2)
  1. Tom von Alten says:

    I have the inverse problem. I’ve selected J# for installation (because the 1.1 code I need to convert to 2.0 has somehow tapped into the side effects you describe), but the VS2005Pro installer quietly refuses to install the redistributable package.

    C.f. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2651439

  2. Hi Tom – I’m sorry for the hassles you’ve run into in this scenario.  I’ll post a comment on your forum post and request some additional information from there.

Comments are closed.

Skip to main content