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.
The beta version of the .NET Framework 3.5 SP1 and Visual Studio 2008 SP1 were released a few weeks ago. One of the key new features related to deployment that was introduced with the SP1 beta is the .NET Framework 3.5 SP1 client profile. This profile is a subset of the full .NET Framework 3.5 SP1 installer that is designed to deliver assemblies needed in most common .NET Framework client applications. Enabling this type of refactoring was one of the motivations for the behind the scenes deployment architecture changes made in the .NET Framework 2.0 SP1 and 3.0 SP1 (described in more detail in this blog post).
This is a fairly big shift from the traditional .NET Framework installation process - in the past, it has always been an "all or nothing" installation, which means that an application could check one detection registry value and determine whether or not the full .NET Framework runtime is installed on a given system. Now, a system could have this client profile installed, which will only deliver a subset of the .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1. Application developers who redistribute the .NET Framework 2.0 or higher with their installer will need to decide how to take this profile into account in their detection logic.
The client profile is optimized for systems that do not yet have a version of the .NET Framework 2.0, 3.0 or 3.5 installed. Here is a quick summary of how the installer for the client profile will behave in various scenarios:
The client profile also has implications on existing applications that include previous versions of the .NET Framework 2.0, 3.0 or 3.5 as a part of their installers. If a system has the client profile installed, they have a partial install of the .NET Framework 2.0 SP2, the .NET Framework 3.0 SP2 and the .NET Framework 3.5 SP1. If an application later attempts to install the original release of the .NET Framework 2.0, 3.0 or 3.5, that would leave the system with a hybrid .NET Framework - some of the bits would be from the original release and other bits would be from a service pack. In order to avoid that hybrid state, the client profile setup configures some settings behind the scenes to prevent installation of any older versions of the .NET Framework 2.0, 3.0 or 3.5 on a system that has the client profile installed.
It looks like there are still some bugs that need to be worked out in this process though. I was able to to install the client profile on my Windows XP SP2 test machine with no issues. However, when I try to run the original .NET Framework 2.0, 3.0 or 3.5 setup, the system attempts to invoke the file %windir%\Microsoft.NET\Framework\v3.5\DotNetInstallBlock.exe and that process crashes. Also, if I try to run .NET Framework 1.0 or 1.1 setup on this system, it still tries to invoke DotNetInstallBlock.exe even though this client profile should not need to block installations of versions 1.0 or 1.1 of the .NET Framework.
Since this client profile is still in beta, there is not a lot of official documentation available for it yet. However, here are a few useful links I've found so far that provide some additional detail about the client profile:
For reference, here are some other useful links for Visual Studio 2008 SP1 and the .NET Framework 3.5 SP1:
Question:
I am attempting to figure out how to redistribute the .NET Framework 2.0 SP1 and .NET Framework 3.0 SP1 standalone packages with my application. As a test, I tried to run both of these redistributable packages on Windows Vista, but the installation processes were blocked and I could not get the .NET Framework 2.0 SP1 or 3.0 SP1 to install them on that OS. How can I install the .NET Framework 2.0 SP1 and 3.0 SP1 on Windows Vista if they are needed for my application?
Answer:
The standalone redistributable packages for the .NET Framework 2.0 SP1 and 3.0 SP1 only include MSI-based installers. Because the .NET Framework 2.0 and 3.0 are shipped as OS components on Windows Vista, you cannot install the MSI-based versions of these service packs on Windows Vista. There are 2 supported ways of getting the .NET Framework 2.0 SP1 and 3.0 SP1 to install on Windows Vista:
Also note that Windows Server 2008 includes the .NET Framework 2.0 SP1 and 3.0 SP1, so you do not need to install any additional packages in order to get those service packs on Windows Server 2008.
Recently, beta versions of Visual Studio 2008 SP1 and the .NET Framework 3.5 SP1 were released (see announcement posts here and here for in-depth information if you are interested).
As Heath Stewart described in more detail in this blog post, the Visual Studio 2008 service pack has a new setup bootstrapper to provide a unified installation experience, better progress and error handling and fix some of the key issues that affected the Visual Studio 2005 service pack installation experience. One of the outcomes of this new bootstrapper is that some new log files are created that can be useful to help troubleshoot SP1 installation issues.
I previously posted a list of log files that can be produced by Visual Studio 2008 and .NET Framework 3.5 setup. In addition, I posted a link to a tool to automatically gather these log files and create a cab file to make them easier to send via email or attach to bug reports.
As Heath pointed out in this blog post, the information in those posts became a bit out of date with the release of the VS 2008 SP1 beta. I have updated those blog posts to include information about new logs that are being created by VS 2008 SP1 beta setup and will continue to update it if any additional logs are created by the time the final version of VS 2008 SP1 is released. I also updated the version of the log collection tool that is linked in my previous blog post to also collect VS 2008 SP1 beta setup log files.
You can find the most up-to-date version of the Visual Studio 2008 and .NET Framework 3.5 log collection tool at http://go.microsoft.com/?LinkId=8967043. This link will continue to be redirected as the tool is updated in the future as well.
Update: There is now a knowledge base article at http://support.microsoft.com/kb/954622 with more information and a workaround for the issue described in this blog post. I encourage you to take a look at that article before using the steps listed in this blog post.
Recently, I have heard from a few customers who have had an issue installing the Xbox 360 PC setup package in order to configure their Xbox 360 as a Windows Media Center Extender. I want describe the issue, what is happening behind the scenes and how to work around it in case anyone else runs into it in the future.
Description of the issue
The customers I talked to had all previously upgraded to Windows XP SP3, and when they attempted to run Xbox 360 PC setup afterwards, they received an error message that looks like the following:
There is a problem with the installation of Windows XP Media Center Edition 2005. Uninstall the update to Media Center Edition 2005 and then re-install the update from the Windows Update website. Then run Media Center Extender setup again.
How to diagnose the issue
In this case, the last entries in the main log file created by Xbox 360 PC setup (%windir%\dvcsetup.log from the list in this blog post) look like this:
11:11:11 AM : Verifying MCE version. 11:11:11 AM : OS is Emerald : Verifying Sessions QFE is installed. ***********************************************************ERROR***********************************************************Start conditions NOT met. 11:11:21 AM : Checking for generic error during affiliation... 11:11:21 AM : Turning off the InOOBE flag. WARNING: Error turning off the InOOBE flag. 11:11:21 AM : Exiting
11:11:11 AM : Verifying MCE version.
11:11:11 AM : OS is Emerald : Verifying Sessions QFE is installed.
***********************************************************ERROR***********************************************************Start conditions NOT met.
11:11:21 AM : Checking for generic error during affiliation...
11:11:21 AM : Turning off the InOOBE flag.
WARNING: Error turning off the InOOBE flag.
11:11:21 AM : Exiting
Root cause of the issue
I looked in the source code for this installer, and at this stage of setup, it is trying to verify that Windows hotfix KB895961 (codenamed the "Sessions QFE" in the log file snippet above) is installed on the system by checking the following registry value:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB895961]Installed=1 (REG_DWORD)
In Windows XP SP3, the code that is a part of this hotfix is a part of the service pack and no longer needs to be installed via a separate hotfix package. As a result, that registry value ends up getting deleted by the XP SP3 installation process. To complicate things, it is not possible to simply re-install the version of the KB895961 hotfix package that is available as a prerequisite during Update Rollup 2 for Windows XP Media Center Edition 2005 setup because that package only allows installing on Windows XP SP2.
How to work around the issue
The Media Center team is investigating options for posting an updated version of KB895961 that will allow installing on Windows XP SP3 in order to work around this Xbox 360 PC setup issue. In the meantime, you can use the following steps to manually add the registry value that Xbox 360 PC setup is using to detect whether or not KB895961 is installed and unblock the installation on a Windows XP SP3 system:
It is safe to manually add this registry value because the fixes that are a part of KB895961 were rolled up and included in Windows XP SP3. This registry value will simply prevent Xbox 360 PC setup from thinking that the system does not yet have KB895961.
Important note about non-Windows XP SP3 scenarios
Note - if you encounter this error on a Windows XP SP2 system (instead of a Windows XP SP3 system), then you should be able to use steps like the following to work around this error:
<update date="2/15/2010"> Added a link to a knowledge base article that has been subsequently written about this issue - http://support.microsoft.com/kb/954622 </update>
As announced in this post on the XNA team blog, there is a new version of the XNA Creators Club web site that went live yesterday. The new site includes the content and forums from the previous site and also includes a beta version of the front end for submitting and peer reviewing Xbox LIVE community games (a feature previously announced at GDC 2008 back in February). In addition, there is some new content such as the Role Playing Game starter kit for XNA Game Studio 2.0.
There are a couple of important notes to keep in mind about the Xbox LIVE Community Games beta:
Here are a couple of useful links to help you get started with the Xbox LIVE Community Games beta:
I encourage everyone to check out the new XNA Creators Club web site and participate in the Xbox LIVE Community Games beta if possible.
While I was out on vacation for the past couple of weeks, the XNA Community Gaming Platform (CGP) team released a community technology preview of XNA Game Studio 3.0 (announced in this post on the team blog). I'm sure that most folks are already aware of this but I wanted to link here just in case, and I also wanted to provide some additional links to help getting started using the XNA Game Studio 3.0 CTP.
The XNA Game Studio 3.0 CTP adds the following key features:
Here are some links with information about how to download and get started using the XNA Game Studio 3.0 CTP:
Here is some information that can be useful if you encounter errors while installing the XNA Game Studio 3.0 CTP:
Here are some key limitations to keep in mind when getting started installing and using the XNA Game Studio 3.0 CTP:
Here are some links with information about getting started creating Zune games using the XNA Game Studio 3.0 CTP:
My colleague Michael Klucher recently recorded a video for Channel 9 that I wanted to link to here. In the video, located at http://channel9.msdn.com/ShowPost.aspx?PostID=400948, Michael presents more details about Zune development features that will be a part of the upcoming XNA Game Studio 3.0 product.
Zune development was originally announced at GDC this past February, and you can find some additional information in this post on the XNA team blog, this FAQ and this discussion post on the Creators Club forums.
If you are interested in seeing more information about upcoming Zune development features in XNA Game Studio, I encourage you to check out Michael's Channel 9 video.