Now that Visual Studio 2005 has shipped, I've gotten a couple of questions from customers wondering why they are able to uncheck the J# language tools item in the Visual Studio setup tree and yet setup still installs the J# redistributable package 2.0. I partially addressed this issue in a previous blog post back when VS 2005 beta 2 shipped. The same underlying design that I described in that post exists in the final release of VS 2005. Essentially, the algorithm for deciding whether or not to install the J# redistributable is the following:
- Setup looks at the file baseline.dat and finds the J# redistributable package 2.0 item represented by the section titled [gencomp68]
- The [gencomp68] section contains the value ComponentType=3, which means that it is a chained package that will be conditionally installed after the main VS 2005 MSI depending on what features are chosen in the setup feature tree
- The [gencomp68] section contains a list of GUIDs in the value DependentFeatures that represent FeatureID values in the Feature table of the main vs_setup.msi
- Setup iterates over that list of GUIDs and if it detects that any of the features represented by those GUIDs are selected to be installed as part of VS 2005, it adds the J# redistributable package v2.0 to the list of items that need to be installed after the main VS 2005 MSI is done installing
Now, if you take a look at the baseline.dat file in a text editor and locate the list of GUIDs, you can search for those values in the Feature table of the VS 2005 MSI, you can see that if the J# or Visual Web Developer language tools features are selected during setup, the J# redistributable will also be installed for you as a chained component.
The next question that has come up is one that I haven't addressed in that previous blog post - why does Visual Web Developer require the J# redistributable? At a high level, the answer is that you are able to develop web applications in any number of programming languages, including J#, so therefore the J# redistributable is installed in case you decide to develop your web applications in J#.
That answer leads to one additional question - why can't you just install Visual Web Developer C# support or something like that if you know ahead of time that you are not planning to develop web applications in J#. If you look at the feature tree for VS 2005 setup, you will see a single item under Language Tools named Visual Web Developer. However, this feature is not sub-divided any further, so it is not currently possible to install only the pieces required to install Visual Web Developer C# support, Visual Web Developer VB support, Visual Web Developer J# support, etc. We determined while developing VS 2005 that it would be very time-intensive and error-prone to try to sub-divide the Visual Web Developer features on a language-by-language basis, and that it would only have questionable benefit to the end user. Therefore, we had to make a trade-off and the decision was made to live with the side effect of installing the J# redistributable package if the user chooses to install Visual Web Developer during VS 2005 setup (even if the user does not choose to install the J# language tools). Essentially, we decided that the benefit was not worth the cost, and that we had already noticeably improved the setup behavior related to the J# redistributable from the VS 2003 product (I described the VS 2003 behavior and the background behind why it behaved that way in this post).