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.
As noted in my previous blog post, the Windows Phone Developer Tools 7.1 Beta was released this week. I’ve heard from a few people who have had problems installing the WPDT 7.1 beta because setup detected incompatible components installed on the computer. I want to describe this scenario in a bit more detail in case anyone reading my blog in the future runs into similar problems.
If you see an error installing WPDT 7.1 due to incompatible components, I suggest using steps like the following to diagnose and resolve this issue:
[Microsoft Visual C# Express 2010] VersionCheck=PreReqRegVerCheck DetectKey=HKLM,SOFTWARE\Microsoft\DevDiv\vcs\Servicing\10.0\xcor DetectKeyVal=Version DetectKeyValData=40219.01 This means that setup will block if the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vcs\Servicing\10.0\xcor@Version exists and the value is less than 40219.01. There is one subtle issue here - the WPDT setup is a 32-bit application, so that means that the registry location will be different on a 64-bit version of Windows. In the example above, the registry key will be at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vcs\Servicing\10.0\xcor@Version.
If you run into WPDT installation issues that are not solved by the above suggestion, you can use the log collection tool to gather your setup log files. This log collection tool will create a file named %temp%\vslogs.cab. Once you have gathered your setup log files, you can upload them to a file server of your choice (such as http://skydrive.live.com), and post a link to the log files in the forums or in a comment on my blog to get additional support.
<update date="8/29/2011"> Added a step to restart the computer in case there are any files or registry keys in use that need to be removed by the uninstall process in step 3. </update>
As announced on the Windows Phone Developer Blog and on the App Hub web site, the Windows Phone Developer Tools (WPDT) 7.1 Beta (which includes an XNA Game Studio 4.0 Refresh Beta as well) was released for download today.
Getting Started links
Here are links to help you get started installing and using the Windows Phone Developer Tools Beta:
Documentation links
Here are some links to useful documentation to help you get started with the Windows Phone Developer Tools Beta:
Here are some links to useful documentation to help you get started with the XNA Game Studio 4.0 Refresh beta:
Support links
Here are some links if you run into questions or issues with the Windows Phone Developer Tools 7.1 Beta:
How to install
Here are steps you can use to install the Windows Phone Developer Tools 7.1 Beta:
If you encounter Windows Phone Developer Tools 7.1 Beta setup failures
If you run into an installation or uninstallation failure for the Windows Phone Developer Tools 7.1 Beta, you can use the log collection tool to gather your setup log files. This log collection tool will create a file named %temp%\vslogs.cab.
Once you have gathered your setup log files, you can upload them to a file server of your choice (such as http://skydrive.live.com), and post a link to the log files in the forums to get additional support.
If you run into uninstallation issues with any release of the Windows Phone Developer Tools or XNA Game Studio, you can use the cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to remove WPDT or XNA Game Studio.
I have heard from a few people in the past who have run into setup failures with error code 1719 or 1723 while installing the 64-bit version of the .NET Framework on a 64-bit version of Windows. I want to describe the underlying issue in a little more detail and provide a couple of possible workarounds in case you run into this type of issue in the future.
How to diagnose this issue
If you are encountering this issue, you will see one of the following errors in the verbose MSI log file for the failing installation:
MSI (s) (DC:FC) [12:34:56:023]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICE44.tmp, Entrypoint: SchedSecureObjects MSI (s) (DC:B8) [12:34:56:024]: Generating random cookie. MSI (s) (DC:B8) [12:34:56:051]: Created Custom Action Server with PID 1884 (0x75C). MSI (s) (DC:98) [12:34:56:092]: Running as a service. MSI (s) (DC:98) [12:34:56:094]: Custom Action Server rejected - Wrong Context MSI (s) (DC:B8) [12:34:56:097]: CA Server Process has terminated. Action start 12:34:56: SchedSecureObjects_x64. MSI (s) (DC:94) [12:34:56:098]: Note: 1: 1719 CustomAction SchedSecureObjects_x64 returned actual error code 1601 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (DC:94) [12:34:56:738]: Product: Microsoft .NET Framework 4 Client Profile -- Error 1719. The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance. MSI (s) (B4:74) [12:34:56:098]: Note: 1: 1723 CustomAction SchedSecureObjects_x64 returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (B4:74) [12:34:56:738]: Product: Microsoft .NET Framework 4 Client Profile -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action SchedSecureObjects_x64, entry: SchedSecureObjects, library: C:\Windows\Installer\MSIE8C8.tmp
MSI (s) (DC:FC) [12:34:56:023]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICE44.tmp, Entrypoint: SchedSecureObjects MSI (s) (DC:B8) [12:34:56:024]: Generating random cookie. MSI (s) (DC:B8) [12:34:56:051]: Created Custom Action Server with PID 1884 (0x75C). MSI (s) (DC:98) [12:34:56:092]: Running as a service. MSI (s) (DC:98) [12:34:56:094]: Custom Action Server rejected - Wrong Context MSI (s) (DC:B8) [12:34:56:097]: CA Server Process has terminated. Action start 12:34:56: SchedSecureObjects_x64. MSI (s) (DC:94) [12:34:56:098]: Note: 1: 1719 CustomAction SchedSecureObjects_x64 returned actual error code 1601 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (DC:94) [12:34:56:738]: Product: Microsoft .NET Framework 4 Client Profile -- Error 1719. The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
MSI (s) (B4:74) [12:34:56:098]: Note: 1: 1723 CustomAction SchedSecureObjects_x64 returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (B4:74) [12:34:56:738]: Product: Microsoft .NET Framework 4 Client Profile -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action SchedSecureObjects_x64, entry: SchedSecureObjects, library: C:\Windows\Installer\MSIE8C8.tmp
The underlying problem in this scenario is that Windows Installer is incorrectly configured to run in 32-bit mode. 64-bit custom actions cannot run in 32-bit mode, and so any 64-bit MSI that includes a 64-bit custom action (including, but not limited to, all 64-bit versions of the .NET Framework starting with 2.0) will fail in this way the first time it tries to run a 64-bit custom action.
How to work around this issue
If you are encountering this issue, you can remove the following registry value to prevent Windows Installer from trying to run 64-bit custom actions in 32-bit mode:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msiserver] WOW64=1
If the above registry value does not exist on your computer, then there is another possible root cause and workaround described in this blog post from Robert Flaming.
Last fall, I wrote a blog post linking to some information about using Guide.IsTrialMode in an XNA Game Studio 4.0 game for Windows Phone. Since then, the XNA Game Studio team has updated the behavior of the Guide.IsTrialMode API to simulate the same performance characteristics during development that a game will experience when a game is downloaded from the Windows Phone Marketplace. This change is available in the Windows Phone update that was released this spring:
As a result of this behavior change, the following point in my previous blog post no longer applies:
The following points from my previous blog post still apply, and should be taken into account when implementing trial mode functionality in your game:
<update date="5/5/2011"> Added a clarifying note to recommend that the trial check be done in the Activated event handler. </update>