Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
I stumbled across a post on the Internet Explorer team's blog from last Friday that I wanted to post a link to here. According to this post, the Internet Explorer team has created a public bug reporting database that all users can access to report problems and suggest new features for Internet Explorer.
The Developer Division has had a public bug database since the early beta versions of Visual Studio 2005 and the .NET Framework 2.0, and I am a big believer of the power of this kind of public bug reporting tool in improving product quality and allowing real-world users to provide specific feedback about the pain points and bugs in our products. As an example, I previously posted a case study regarding a bug in the .NET Framework 2.0 setup that I believe we would not have been able to find and fix without having a public bug database. Because of this, I'm really excited to see another Microsoft product provide a bug database for the public to use to report issues.
Hopefully this momentum will continue and eventually we will have something like this for Media Center!
Now that I have posted items about how to create a network install point for a Visual Studio 2005 Express Edition and about how to silently install a Visual Studio 2005 Express Edition, it is time to post part 3 of what I had originally envisioned to be a series of items about deploying the Express Editions.
In this post, I will extend upon the topic of creating a network install point and demonstrate how to create a network install point that can be used to install all of the Express Editions from a single location. This topic is more advanced than my previous posts, and it requires some modifications to setup data files, but it is all achievable with a few relatively simple steps. This overall post is long, but that is only because I am listing specific steps for each individual Express Edition separately to make it easier to read.
At a high level, what we will be doing is downloading the individual packages for each Express Edition and then downloading the prerequisite packages (which are common to all Express Editions). Then we will update the setup data file for each Express Edition to force setup to search for the prerequisite packages in a common location so they only have to be downloaded and stored on the network install point once.
Here are the specific steps to accomplish this:
Now, for each of the other 4 Express Editions (Visual Basic 2005 Express Edition, Visual C++ 2005 Express Edition, Visual C# 2005 Express Edition and Visual J# 2005 Express Edition), follow the set of steps listed below to add them to the network image.
Once you have staged the desired Express Editions, you can run the individual setup.exe files in the c:\Express_Editions\<edition_name> subfolders to run each setup in full UI mode, or you can use steps like those listed in this blog post to install the Express Editions in silent mode.
Visual Basic 2005 Express Edition
Visual C++ 2005 Express Edition
Visual C# 2005 Express Edition
Visual J# 2005 Express Edition
Francis Hogle, the development manager for the Windows Media Center core team, has posted a really nice introductory overview about how Windows Media Center works behind the scenes. It uses diagrams and pictures to explain how we have separated the User Experience Framework from the Rendering Engine and talks about how these pieces talk to each other. If you've ever been curious about how Media Center was designed and built behind the scenes and how Media Center Extenders work, I highly encourage you to check this link out.
Also, the title of that post includes the phrase "Part One of Four" so I'm already looking forward to the rest of Francis' posts. Since his office is just across the hall from me, I'll have to stop by and bug him about this :-)
Recently, I wrote a couple of blog post (here and here) about how to enable multi-lingual development scenarios by taking advantage of the Visual Studio IDE UI language switching feature. I would like to add to those previous posts by showing an example of using this feature, including some screenshots.
For this example, I will use the English and French versions of the Visual C# 2005 Express Edition. However, it works equally well for any version and UI language of Visual Studio.
I configured my system as follows:
Now that I have both the French and English versions of VC# Express installed, I can easily switch IDE UI languages. When I launch the IDE with English UI, it appears as follows:
Once I launch the IDE with English UI, I can do the following to change the UI language to French:
The English Options dialog looks like the following:
After following the above steps and then reopening the IDE, VC# will appear as follows:
I am able to change the language back to English by using the same set of steps as listed above, except I need to refer to the French translation for each of the IDE UI elements. The French Options dialog looks like the following:
In addition to using the steps listed above, I can change the IDE UI language by using the following command lines:
It is important to note that when using the /LCID command line switch, the default UI language will be updated in the registry when Visual Studio launches. That means that if you had previously configured VS to launch in English and you then pass in /LCID 1036, you will set the default language to French. That means that when you close the IDE and reopen it using the Start menu shortcut it will continue to appear with French UI until you change it in the International Settings section of the Options dialog or launch the IDE with /LCID 1033.
One other interesting note that I want to emphasize here - IDE language switching will be available even if you don't install the exact same edition of Visual Studio for each language. For example, you can install the English Visual Studio Team Suite and the French Visual Studio Professional. However, the only UI that will correctly switch languages will be components that are common to the two editions that you install on your system. So you might see a mix of two different UI languages depending on what editions you have installed on your system and what features you use within the IDE. In addition, there are limitations in the UI language fallback mechanism for some IDE features, so you may see some features missing from the IDE even though the feature is installed for one of the two UI languages.
<update date="2/10/2011"> Fixed broken links to images used in this post. </update>
I previously posted links to a feature specification and user interface video for the Q podcast and video blog client application that has been written using the new Windows Media Center Presentation Layer. This application was demonstrated as part of Joe Belfiore's keynote speech at Mix06 last week.
I just noticed that Charlie has posted a bunch more information about the Q application, including some screenshots. I encourage you to take a look at his post to see some details about what this application and the Windows Media Center Presentation Layer can do.
This application was designed from the beginning to be a sample application that would allow us to show a real-world example of the type of functionality and UI that can be achieved using the Windows Media Center Presentation Layer on the Windows Vista version of Media Center.
In the past, we have not done a great job of demonstrating real-world applications in the Media Center SDK, so I am really excited that we are planning to include this application (source code, MCML markup and all) in the Media Center SDK for Windows Vista. I really hope we will be able to get this in for beta 2 so folks can start taking a look at the code and markup as soon as possible.
I have heard from a few folks who have run into issues installing the software to enable using an Xbox 360 as a Media Center Extender with Windows XP Media Center Edition 2005. I wanted to post a list of log files that are created by the Xbox 360 PC setup package so that people have a place to start looking if this setup fails for some reason.
Xbox 360 PC setup is implemented as a chained set of Windows XP hotfixes, a version of the .NET Framework, Update Rollup 2 for Windows XP Media Center Edition 2005, and a couple of other miscellaneous packages. Depending on which of the components are already installed on your system, the Xbox 360 PC setup will create some or all of the following log files:
You can also download this script and run it to automatically gather all of the above files into a single directory to make it easier to find them.
I received a question from a customer last night asking about the availability of a version of the .NET Framework setup verification tool that I have previously posted that would work with the .NET Framework 2.0.
I had been meaning to update the setup verification tool for a while, but I guess I ended up forgetting about it since nobody had asked me for it up until now. At any rate, I have posted an updated version of the .NET Framework setup verification tool that will now support the .NET Framework 2.0 in addition to the previously supported versions (1.0, 1.0 service packs, 1.1, 1.1 language packs and 1.1 service packs).
As always, please let me know if you have any trouble getting this tool to work or have any suggestions...
A few folks (both inside and outside of Microsoft) have contacted me asking for instructions for how to install the Visual Studio 2005 Express Editions in silent and/or unattended mode.
Some of you have found the instructions I previously posted for Visual Studio 2005 unattended installations and tried them with the Express Editions. However, you will find that running any of the Express Edition setup.exe files with the /createunattend or /unattendfile switches will show an error dialog stating that those switches are not supported with this setup package.
There is not a built-in automated silent or unattended installation mode for the Express Editions, so the method for performing silent installation is a bit more involved than it is for the higher-level versions of Visual Studio 2005. You have to download each of the setup packages that is chained as part of the Express Edition setup and then run each of them using their individual silent mode command line switches.
To accomplish the setup package download, you need to follow the instructions to create a network install point for a VS 2005 Express Edition.
Once you have downloaded the pieces of the Express Edition setup package, you will need to figure out which pieces are needed for the OS type (Windows XP, Windows Server 2003, etc), OS language (English, etc), processor architecture (x86, x64) and Express Edition type (VB, VWD, etc).
The following is a list of the Express setup packages, what conditions they are needed for and their silent command line switches:
Windows Installer 3.1
Needed on Windows 2000 and Windows XP if not already installed
WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart
.NET Framework 2.0 (x86)
Needed on all x86 operating systems if not already installed
dotnetfx.exe /q:a /c:"install.exe /q"
.NET Framework 2.0 (x64)
Needed on all x64 operating systems if not already installed
NetFx64.exe /q:a /c:"install.exe /q"
.NET Framework 2.0 language pack
Needed for all non-English Express Editions if not already installed
langpack.exe /q:a /c:"install.exe /q"
J# Redistributable 2.0
Needed only for the J# Express Edition on all operating systems if not already installed
vjredist.exe /q:a /c:"install.exe /q"
J# Redistributable 2.0 language pack
Needed for non-English J# Express Edition if not already installed
vjredist-LP.exe /q:a /c:"install.exe /q"
Lite Debugger Package (x64)
expdbgsetup.exe /q:a /c:"install.exe /q"
Main Express Edition package
Needed on all operating systems. The exact command line depends on which Express Edition you want to install.
Optional on all operating systems if not already installed
msdnixp.exe /q:a /c:"Install.exe /q"
SQL Express (x86)
Optional on all x86 operating systems if not already installed
SQLEXPR32.EXE -q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=2 SQLAUTOSTART=1
SQL Express (x64)
Optional on all x64 operating systems if not already installed
SQLEXPR.EXE -q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=2 SQLAUTOSTART=1
Additional notes about silent install of the Express Editions:
<update date="4/11/2006"> Updated command lines for Main Express Edition packages - I missed the REBOOT=ReallySuppress and /qn switches from a few of the editions </update>
Earlier today, I posted an item on the Media Center Sandbox site introducing Windows Media Center Presentation Layer Web Applications. I encourage you to take a look at that post and learn a bit about a new feature that will be available for the Media Center platform starting in Windows Vista beta 2.
I am already getting excited about using this new feature to post sample markup files that folks can easily browse to in McmlPad once we release the beta 2 Media Center SDK. That will make it much faster and easier for us to share new sample content with the Media Center development community.
Unfortunately, this feature is not available in the Febraury CTP, so I cannot yet ask you to try it out and send me feedback. But I think Charlie Owen will be showing this during Mix06 (and if he doesn't, you should track him down and ask him to!), so if anyone reading this is going to be at Mix06 I encourage you to check it out there.
A customer contacted our setup team this week with a problem on their Media Center system - they saw some problems with Media Center, and then tried to reinstall Update Rollup 2 to fix it but then were unable to run Media Center at all because it crashed when trying to launch.
I investigated this system and found that they had a Sony XPS-XL1 system that came with a DVD changer and had a Media Center add-in called Sony Changer that was installed. This Sony Changer application was incorrectly installing a copy of a Media Center binary (Microsoft.MediaCenter.dll) to the system, which then caused Update Rollup 2 setup to fail when the customer re-ran it. I previously described this scenario in more detail in this blog post if you are interested. The bottom line is, with this incorrectly authored Sony Changer setup package installed, any Media Center hotfix that needs to update the file Microsoft.MediaCenter.dll will fail to install and leave the system in a state where Media Center will crash during attempts to launch it.
After talking to some folks on our team and at Sony, I found out that Sony released an update to their Sony Changer application on March 14, 2006 that addresses this problem (as well as some other issues). You can find a link to the setup package for the updated Sony Changer software at this link on the Sony website.
If any of you have bought a Sony Media Center system and have the Sony Changer application installed, I strongly encourage you to install this updated package if you haven't already. We have not yet published any hotfixes after Update Rollup 2 that contain updates to Microsoft.MediaCenter.dll, but there is always the chance that we'll have to update it in the future, and if you do not update your Sony Changer application, future hotfixes for Media Center might fail to install and leave your system in a broken state.
I previously posted a list of command line switches for .NET Framework 2.0 setup. One of the customers who found that post asked if there was a similar list for the .NET Framework 1.1. I thought I had written a post with that list but it appears I never did, so here it is...
.NET Framework 1.1 setup command line switches
The above switches also work for the .NET Framework 1.1 SDK and language packs.
.NET Framework 1.0 setup command line switches
It is not easy to figure out from the list above how to perform a silent uninstall of the .NET Framework 1.0 because of the /p switch. Here is an example of how to silently uninstall the English version of the .NET Framework 1.0:
dotnetfx.exe /q:a /c:"install.exe /u /p Microsoft .NET Framework Full v1.0.3705 (1033) /q"
dotnetfx.exe /q:a /c:"install.exe /u /p Microsoft .NET Framework Full v1.0.3705 (1033) /q"
I tried to install Visual Studio 2005 using the unattended installation instructions that you previously posted, and in some cases I see that the computer reboots without any notification to the user, and I have to either log the computer back on or configure automatic logon to allow unattended setup to finish installing VS 2005. When I searched through the log files I found that one of the prerequisite components required a reboot.
How can I configure unattended installation so that it will suppress reboots until the end so I can avoid this scenario?
Visual Studio 2005 unattended installation suppresses all UI, and it does not have built-in support for suppressing reboots until the end. In previous versions of Visual Studio (VS .NET 2002 and 2003), the recommended solution for this scenario was to create a script that pre-installs each of the prerequisite components and then installs VS using the /unattendfile switch and an unattended INI file. Doing this allows you to manage any possible reboots during prerequisite setup package installation on a more granular level.
However, VS 2005 setup shipped with a bug in the unattended INI file creation process that causes prerequisite components to be included for installation in the INI file even if they have already been installed on the system. I previously talked about a workaround for this type of issue on Windows Vista in this blog post. A couple of recent emails from customers alerted me to the fact that this issue happens on all operating systems and not just on Windows Vista.
In order to create a script that that will allow you to suppress reboots during unattended installation of VS 2005, you will need to do the following:
1. Create and modify an unattended INI file to work around the bug described above:
2. Create a script to install the prerequisites and then run VS 2005 in unattended mode:
Knowledge base article KB913445 also describes this scenario and provides a slightly different workaround. That knowledge base article only describes how to fix x86 installation scenarios, so I would suggest following the steps in this blog post instead of the ones in the knowledge base article.
<update date="3/26/2006"> Added a link to a knowledge base article which was recently published about this scenario </update>
I just noticed that Charlie Owen posted an item on his blog about the sample application named Q that will be demonstrated next week at Mix06 in Las Vegas. In Charlie's blog post, he provides a link for the functional specification for Q and also a link for a video that Charlie recorded demonstating the user interface and animations for Q on one of our developer's computers.
Q is a podcast / videoblog client for Media Center that allows users to discover, subscribe to and view content offered via RSS 2.0 feeds. It started out as a demo that was going to be used during Charlie's talk at Mix06 and has progressed so quickly that we are now planning to include it in the keynote at Mix06 and hopefully ship it as a sample application in the Media Center SDK for Windows Vista.
Q is written as a Media Center add-in using the new Windows Media Center Presentation Layer and Media Center Markup Language for Windows Vista (previously introduced by Charlie in this blog post). Most of the coding and markup work for the Q application has been done by Stephen Toub (a friend of the Media Center team who has written some great articles on MSDN) and Mark Finocchio (the primary developer for the Windows Media Center Presentation Layer on our team).
It has been very exciting for me to see how quickly and easily add-ins can be created for Media Center using our new programming models available in Vista. I can't wait to see what other types of applications people are going to come up with now that the Media Center SDK is available with Windows Vista community tech previews (CTPs).....
Last week, someone asked me about how to perform automated installations of the Visual Studio 2005 Express Editions. They were trying to use steps similar to what I previously documented for automating the installation of the higher-level versions of Visual Studio 2005 but finding that they did not work.
The underlying issue is that the Express Editions were not designed to support unattended installations like the other Visual Studio versions. There are ways to work around this limitation, but they are fairly involved. Instead of trying to document how to do this in a single step, I am going to create a couple of articles
The first step required to automate the installation of Visual Studio 2005 Express Editions is to create a network install point that can be used to install from. I have posted an article that contains a couple of options that you can choose from to create a network install point for one of the Visual Studio 2005 Express Editions.
I will be creating additional blog articles in the near future to complete this picture. They will explain how to script the install of the various pieces that make up Express Edition setup and how to create a network install point for multiple Express Editions. Stay tuned....
A few days ago, I posted some general information about how multi-lingual development can be enabled in the Visual Studio IDE.
In response to that blog post, one customer posted a question asking about whether it is possible to launch the VS IDE with a command line switch to automatically start it with the desired UI language. The idea behind this is that a shortcut could be created for each user and they could start the IDE in their chosen language just by double-clicking the shortcut. I looked around on MSDN and found a command line switch that enables this type of scenario.
The /LCID command line switch can be used to specify the preferred UI language when launching the Visual Studio IDE. The LCID is the 4-digit language code corresponding to the language you want the UI to display in. For example, 1033 represents English. The command line will look something like the following, assuming you have Visual Studio 2005 and it is installed to the default location:
%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\devenv.exe /LCID 1033
%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\devenv.exe /LCID 1033
The value passed in via this switch gets propagated to the setting that you can view in the Tools | Options | Environment | International Settings preferences page. If you pass in an LCID value that represents a Visual Studio language that is not installed on your system, Visual Studio will automatically change it back to a default value.
You can find a partial list of LCID values in this MSDN article (unfortunately I could not find a comprehensive list). Note that the values listed in this table are in hexadecimal, and you will need to convert the value to decimal in order to pass it to the VS IDE via the /LCID command line switch. You can convert the value with the following steps:
About a month ago, I received a blog comment from a customer who diagnosed and solved an issue where Media Center guide download was failing with error code 14. Since then, a few other customers have replied to that blog comment indicating that they solved the problem the same way. I wanted to post this item as a standalone blog post to aid searching and discoverability in case other folks run into this issue in the future as well.
Installing or uninstalling BladeRunner Pro can cause Media Center guide download to fail with error code 14.
BladeRunner Pro changes some guide download registry values, which can cause download errors in certain cases. If you currently have BladeRunner Pro installed or recently uninstalled and are encountering guide download error code 14, the following steps may help resolve it:
A while ago, I posted an item regarding a possible cause and resolution for 1935 or 2908 errors during Visual Studio 2005 setup. Since then, I have heard from several customers who have run into similar issues during Document Explorer 2005 setup.
After thinking through these scenarios in more detail, I realized that it is more likely that Document Explorer 2005 setup will fail with a 1935 error than it is that Visual Studio 2005 setup will fail with a 1935 error because Document Explorer is installed as a prerequisite before setup ever tries to install Visual Studio. Therefore, if the .NET Framework is in a bad state (which is generally the cause of these 1935 errors), then the first place it will typically be seen is in Document Explorer setup because that setup package needs to be able to install assemblies to the GAC and requires a functional .NET Framework 2.0 installation on the system to be able to do so. If Document Explorer setup fails, Visual Studio setup will not even be attempted.
Even though this is a bit of duplication from my previous post, I want to list the steps that can be used to workaround this issue with Document Explorer setup in case folks run into this issue.
When Document Explorer 2005 setup tries to install assemblies to the GAC, it may fail because the .NET Framework 2.0 is not correctly installed on the system. In the cases I have seen where this has happened to customers, the underlying problem was that setup detected that the .NET Framework 2.0 was already installed and skipped that prerequisite step. However, the machine did not actually have the .NET Framework 2.0 installed, but instead only had the registry key that setup uses to detect whether or not the .NET Framework 2.0 is installed.
I found that the machines had the following orphaned registry key/value that setup uses to determine that .NET Framework 2.0 was already installed:
In the cases I have seen, the customers deleted this key/value and re-ran Visual Studio 2005 setup, and setup correctly detected that it needed to install the .NET Framework 2.0, and after installing that, Document Explorer 2005 and Visual Studio 2005 setup worked perfectly.
Note - if the above workaround does not help, I would suggest taking a look at the Document Explorer 2005 troubleshooting tips that I previously posted.
One of the features of Visual Studio that has been around for a while and that I'm not sure a lot of folks know about is multi-lingual development support. This feature has been present in Visual Studio .NET 2002, Visual Studio .NET 2003 and Visual Studio 2005.
What this feature means is that you can install multiple language versions of Visual Studio on the same machine, and you will end up with a single version of the IDE and a set of satellite language resource files. Then you can go to the Tools | Options menu and change the language used by the IDE user interface for toolbars, menu items, etc. This can be very useful in a team development setting where developers want to share terminal server machines that have Visual Studio installed but want to run the IDE in their native UI language.
In case you're interested - behind the scenes, Visual Studio setup uses the concept of vertical integration (which I previously described here) to accomplish the multi-lingual install scenario.
I am very curious to know how many people know that it is even possible to install multiple langauge versions of Visual Studio on the same system. In addition, I am curious about how many people actually install and use Visual Studio in this kind of scenario. If anyone reading my blog has any experiences to share with this kind of development scenario, please post a comment so I can learn more about how Visual Studio is being used in the "real world."
Every so often I get questions from customers who ask about how to automate the installation of Windows hotfix packages. I found a knowledge base article that contains a full list of supported command line parameters for Windows hotfix packages that I refer to very often for this type of question, so I thought it would be useful to post it here as well.
This list of command line parameters applies for all Windows hotfix packages currently being released, as well as most older packages.
Please note that this list does not necessarily apply for hotfix packages for other Microsoft products (such as Office, the .NET Framework, SQL Server, etc) however. For those packages, I normally suggest running the hotfix setup package with a /? or /help command line parameter to try to get it to show a usage dialog, and most Microsoft hotfix packages I have seen thusfar will display something helpful when running them with a /? switch.
I noticed a couple of weeks ago that MSN Music is no longer available within Online Spotlight on my Media Center PC. Is there any way I can continue to access MSN Music functionality from within Media Center?
You can use the following steps to navigate to the MSN Music site and have it create a link in the Media Center More Programs menu so you can continue to use MSN Music even though it does not appear in Online Spotlight:
After following these steps, you can go to the Media Center start menu and choose More Programs. There will now be an MSN Music menu item in the list of programs that you can use to launch MSN Music for Windows Media Center.
You previously posted instructions for how to create an administrative install point (AIP) and deploy the .NET Framework 2.0 using Group Policy. How can I create an administrative install point for Visual Studio 2005?
The following steps will allow you to create an administrative install point for Visual Studio 2005:
Once you have created an administrative install point, you can create a Group Policy object to deploy Visual Studio 2005 using machine assignment (Visual Studio does not support per-user deployment scenarios).
Alternatively, you can directly install Visual Studio 2005 from the MSI in your administrative install point by using a command line such as the following:
These instructions are also documented in sections 3.3 and 3.4 of the Visual Studio 2005 administrator mode readme.
<update date="3/11/2006"> Updated command line to create administrative install point to be simpler. There is no need to pass the PIDKEY parameter because the product key information is contained in the transform passed in via the TRANSFORMS parameter </update>
Some developers I know on the Visual Studio IDE team have been looking at online crash analysis data and have pin-pointed a possible root cause if you are seeing the VS IDE crash when you try to exit. This particular scenario is caused by a file being left behind after uninstalling Visual Studio 2005 beta 2 and then installing the final release. The file in question is named dteproperties.tlb and by default it is located at %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE. You can check out this article for a complete description of this problem, including how to determine whether or not your system is susceptible to this issue and a couple of options for how to fix your system if it is hitting this issue.