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.
If you have used previous versions of XNA Game Studio, particularly if you do cross-platform game development, you are probably used to seeing the following drop downs on the standard toolbar in the Visual Studio IDE:
The Visual Studio 2010 Express for Windows Phone IDE that comes with the Windows Phone Developer Tools does not include either of the above drop downs on the standard toolbar by default, and it took me a little while to figure out the set of steps required to add them.
Fortunately, my colleague Michael Klucher documented these steps in a recent post on his blog (complete with step-by-step instructions and screenshots) to make it easier for folks who want to use these drop downs. I encourage you to check out his blog post if you would like to enable the Solution Configurations and Solution Platforms drop downs in Visual Studio 2010 Express for Windows Phone.
Yesterday, I investigated a Windows Phone Developer Tools CTP Refresh installation issue on a colleague’s computer, and I wanted to describe what I found in case anyone else runs into a similar issue.
Description of the issue
Silverlight 4 was posted on Microsoft Update earlier this week, and I found that if this version of Silverlight is installed on a computer prior to running setup for the Windows Phone Developer Tools CTP Refresh, it will cause WPDT setup to fail while it tries to install Silverlight 4. The error in the log file named %temp%\dd_install_vm_xcor_100.txt looks like the following:
[06/04/10,12:34:56] Microsoft Silverlight 4.0: ***ERRORLOG EVENT*** : Error code 1502 for this component means "The event log file is full."
Unfortunately, this error message is misleading, and it does not help to try to clear out your event logs in this scenario. I narrowed this down further by having my colleague run the Silverlight 4 setup in full UI mode from the WPDT setup location. When doing that, it displays an error message stating that a later version of Silverlight is already installed.
How to work around the issue
If you run into this error while trying to install the WPDT CTP Refresh, you can solve it by doing the following:
This issue will be addressed in a future release of the Windows Phone Developer Tools.
I previously wrote a blog post listing the silent install, repair and uninstall command line parameters for the .NET Framework 4. Since then, I’ve gotten questions from a few folks who are trying to deploy the .NET Framework 4 in ways that require them to run the MSIs directly instead of using the setup executable (for example, via Group Policy or WMI). Here are some steps you can use to extract the .NET Framework 4 setup package and create administrative install points for the MSIs that are a part of the .NET Framework 4:
Once you’ve created the administrative install points described above, you should be able to install the MSIs in the administrative install point folders directly or use steps like the ones previously published for the .NET Framework 2.0 to create Group Policy objects to deploy the .NET Framework 4. When doing this, you will need to apply an additional transform to each of the MSI files to prevent the installation from blocking you and telling you to run setup.exe instead. I have created an example transform that you can download from here for this scenario. The transform changes the condition for CA_BlockDirectInstall to False so it will not be run during the installation process.
Important note: when creating administrative install points and installing the .NET Framework 4 MSIs directly, it is your responsibility to install all of the prerequisites for these MSIs onto the target computer prior to attempting to install the MSIs. This includes the OS prerequisites listed here plus the OS update (.msu) files that are packaged with the .NET Framework 4 if you are running setup on Windows Vista or higher. If you do not install these prerequisites, then installing the MSIs will fail.
<update date="6/17/2010"> Added a link to a transform that can be used to bypass the custom actions in the .NET Framework 4 MSIs that prevent installing the MSI drectly and tell you to run setup.exe instead. </update>