Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

  • Aaron Stebner's WebLog

    Link to information about the WiX v3.6 beta

    • 0 Comments

    Rob Mensching posted an item on his blog announcing the release of the WiX v3.6 beta.  The key feature in WiX v3.6 is the Burn bootstrapper/chainer.  To summarize Rob’s post, Burn includes the following features:

    • Modern setup UI, including using managed code for setup UI even if the .NET Framework isn’t installed
    • Child setup package download management
    • Unified progress UI across packages
    • Package-level reference counting
    • Patch slip-streaming
    • Elevation prompt management

    In addition, all known WiX core toolset bugs that were opened against WiX v3.5 or earlier have been fixed in the WiX v3.6 beta.

    I encourage you to download the WiX v3.6 beta and give it a try if you get a chance.

  • Aaron Stebner's WebLog

    Direct download links for the XNA Game Studio 4.0 Refresh and XNA Framework Redistributable 4.0 Refresh

    • 1 Comments

    Last week, we released the final version of the Windows Phone SDK 7.1, which includes the final version of the XNA Game Studio 4.0 Refresh.  After a bit of a delay, we have now also released the standalone versions of the XNA Game Studio 4.0 Refresh and the XNA Framework 4.0 Refresh so you can download and install them separately if you plan to develop Windows and/or Xbox 360 games with XNA Game Studio but do not want to install the full Windows Phone SDK 7.1 in order to do so.

    Here are the standalone download links:

    XNA Game Studio 4.0 Refresh

    XNA Framework Redistributable 4.0 Refresh

    If you have the original version of XNA Game Studio 4.0 or the XNA Framework Redistributable 4.0 installed on your computer, the Refresh installers will automatically upgrade them for you behind the scenes.  If you have any beta version of the Windows Phone SDK 7.1 installed, the Refresh installers will not automatically upgrade them, and you will need to uninstall the beta version first.

    If you encounter XNA Game Studio setup failures

    If you run into an installation or uninstallation failure for XNA Game Studio, please zip your setup log files, 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 App Hub Forums or in a comment on my blog to get additional support.  Here are the log file locations for each version of XNA Game Studio:

    • XNA Game Studio 2.0 - %ProgramFiles%\Microsoft XNA\XNA Game Studio\v2.0\Setup\Logs
    • XNA Game Studio 3.0 - %temp%\XNA Game Studio 3.0 Setup\Logs
    • XNA Game Studio 3.1 - %temp%\XNA Game Studio 3.1 Setup\Logs
    • XNA Game Studio 4.0 - %temp%\XNA Game Studio 4.0 Setup\Logs
    • XNA Game Studio 4.0 Refresh - %temp%\XNA Game Studio 4.0 Setup\Logs

    If you run into uninstallation issues with any release of the Windows Phone SDK or XNA Game Studio, you can use the cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to forcibly remove the Windows Phone SDK or XNA Game Studio.

  • Aaron Stebner's WebLog

    Mailbag: Do I need still need older versions of the .NET Framework on my system after installing the .NET Framework 4?

    • 21 Comments

    Note: This is an updated version of a previous mailbag entry that I posted before the .NET Framework 4 shipped.

    Question:

    I recently installed the .NET Framework 4 on my system. Afterwards, I looked in Add/Remove Programs, and it shows that I have all of the following versions of the .NET Framework installed on my system:

    • Microsoft .NET Framework 1.1
    • Microsoft .NET Framework 2.0 SP2
    • Microsoft .NET Framework 3.0 SP2
    • Microsoft .NET Framework 3.5 SP1
    • Microsoft .NET Framework 4 Client Profile
    • Microsoft .NET Framework 4 Extended

    Do I need any of these older versions of the .NET Framework now that I’ve installed the .NET Framework 4, or can I safely uninstall them?

    Answer:

    In general, my recommendation is to leave the .NET Framework 2.0 SP2, 3.0 SP2, 3.5 SP1 and 4 installed on your computer.

    Unlike previous versions of the .NET Framework, the .NET Framework 4 does not allow an application that was built with previous versions of the .NET Framework to migrate forward and run on it if the previous version is not installed. If you are using any applications that were built with any version of the .NET Framework before version 4, then I recommend leaving both the .NET Framework 3.5 SP1 and the .NET Framework 4 installed.

    You cannot use the .NET Framework 3.5 SP1 unless you also have the .NET Framework 2.0 SP2 and 3.0 SP2 installed. Therefore, you will not be allowed to uninstall the .NET Framework 2.0 SP2 or 3.0 SP2 if you have the .NET Framework 3.5 SP1 installed. If you try to uninstall the .NET Framework 2.0 or 3.0 when the .NET Framework 3.5 is installed, their uninstall processes will block and tell you that they are needed by another application on your system.

    The .NET Framework 1.0 and .NET Framework 1.1 can be installed side-by-side with the .NET Framework 2.0, 3.0, 3.5 and 4. Most applications that were created for the .NET Framework 1.0 or 1.1 will automatically use the .NET Framework 2.0 instead if it is installed on the system. In most cases, that means you do not need to keep the .NET Framework 1.0 or 1.1 installed on your system if you already have the .NET Framework 2.0 installed.

    However, there are some applications that are configured to require a specific version of the .NET Framework, even if later versions of the .NET Framework are installed. If you have any applications like that on your system and try to run them without installing the .NET Framework 1.0 or 1.1, you will get an error message that looks like the following:

    ---------------------------
    MyApplication.exe - .NET Framework Initialization Error
    ---------------------------
    To run this application, you first must install one of the following versions of the .NET Framework:
    v1.1.4322
    Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework.
    ---------------------------
    OK
    ---------------------------

    In the above error message, the version number will be v1.0.3705 if you need to install the .NET Framework 1.0, and it will be v1.1.4322 if you need to install the .NET Framework 1.1.

    If you end up seeing any error messages like this, you can re-install the .NET Framework 1.0 or 1.1 in order to resolve the errors. If you don't end up seeing any error messages like this, then you don't need to worry about re-installing the .NET Framework 1.0 or 1.1.

  • Aaron Stebner's WebLog

    Final version of Windows Phone SDK 7.1 now available for download

    • 8 Comments

    As announced on the Windows Phone Developer Blog and on the App Hub web site, the final version of the Windows Phone SDK 7.1 (formerly named the Windows Phone Developer Tools, and which includes the XNA Game Studio 4.0 Refresh as well) was released for download today.

    Getting Started links

    Here are links to help you get started installing and using the English version of the Windows Phone SDK 7.1:

    Here are download links for non-English versions of the Windows Phone SDK 7.1:

    Documentation links

    Here are some links to documentation to help you get started using the Windows Phone SDK 7.1:

    Support links

    Here are some links if you run into questions or issues with the Windows Phone SDK 7.1:

    How to install

    Here are steps you can use to install the Windows Phone SDK 7.1:

    1. If you have any Visual Studio 2010 editions (such as Professional, Ultimate, C# Express, etc) installed on your computer, you will need to install Visual Studio 2010 SP1 first.
    2. If you have the WPDT 7.1 Beta, the Windows Phone SDK 7.1 Beta 2 or the Windows Phone SDK 7.1 RC installed, you must uninstall it before installing the Windows Phone SDK 7.1. To uninstall it, you can go to the Programs and Features control panel and uninstall the item named Windows Phone SDK 7.1 (RC) - ENU and that will automatically uninstall all of the beta components that you need to remove before proceeding to install the Windows Phone SDK 7.1.

      Note: If you have the original Windows Phone 7 version of WPDT and/or XNA Game Studio 4.0 installed, you do not need to uninstall them. The Windows Phone SDK 7.1 and the XNA Game Studio 4.0 Refresh will automatically uninstall the previous version for you behind the scenes. You only need to uninstall previous 7.1 beta builds.

    3. After updating any existing editions of VS 2010 to SP1 and uninstalling any previous beta versions of the Windows Phone SDK that you previously installed, you can proceed with installing the Windows Phone SDK 7.1.

    If you encounter Windows Phone SDK 7.1 setup failures

    If you run into an installation or uninstallation failure for the Windows Phone SDK 7.1, 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 SDK or XNA Game Studio, you can use the cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to remove the Windows Phone SDK or XNA Game Studio.

  • Aaron Stebner's WebLog

    Windows 8 and Visual Studio 11 developer preview available for download

    • 0 Comments

    As announced on the Building Windows 8 blog and on Jason Zander’s blog among other places, a developer preview of Windows 8 is available for download.  One of the download options for the Windows 8 Developer Preview includes a pre-installed version of the developer tools, including Visual Studio 11 and .NET Framework 4.5 developer preview.

    Here are some links to help you get started downloading and using the Windows 8 Developer Preview and the associated developer tools:

    Rob Mensching posted some additional information on his blog about setup features in Visual Studio 11.  There are a couple of key points that he mentioned in his post that I want to highlight here as well:

    • Visual Studio 11 setup is being built with the WiX 3.6 toolset and the Burn chainer.  This point is a little bittersweet for me personally.  One one hand, I have been really happy to see the Burn chainer technology grow into something that can support the relatively complex chaining scenarios needed by Visual Studio setup.  On the other hand, the previous Visual Studio setup chainer is one of the first things I worked on when I started at Microsoft back in 1999, and it was used to install all versions of Visual Studio from 2002 to 2010 as well as the .NET Framework 3.0 and 3.5.  It feels a little bit like the end of an era for me to finally see that chainer get retired.

    • Setup is integrated more tightly and earlier on in the developer work flow for Metro-style applications for Windows 8 than it has been in previous Windows development paradigms.  I feel pretty strongly that product development as a whole is most effective when setup is integrated into the product development lifecycle instead of being an afterthought.  Rob previously referred to this concept as setup-driven development, and I’m happy to see it become a more established practice in Windows 8.
  • Aaron Stebner's WebLog

    Mailbag: How can I reset Windows Update if it tells me I need an update that is already installed?

    • 3 Comments

    Question:

    I recently received a .NET Framework update from Windows Update.  It installed successfully, but Windows Update continues to offer this update to my computer afterwards.  How can I get Windows Update to detect that this update is correctly installed on my computer?

    Answer:

    In some cases, Windows Update can get confused and think that it needs to continue to offer an update to a computer even after it has been successfully installed.  In this type of scenario, it can sometimes help to reboot your computer and then use the steps listed at http://support.microsoft.com/kb/971058 to reset the Windows Update components on your computer.

    If Windows Update continues to offer an update to your computer even after resetting Windows Update components, then you might need to uninstall and re-install the product that the update applies to in order to cause Windows Update to correctly detect the installation state of the update.

  • Aaron Stebner's WebLog

    Windows Phone SDK 7.1 RC and XNA Game Studio 4.0 Refresh RC now available for download

    • 2 Comments

    As announced on the Windows Phone Developer Blog and on the App Hub web site, the Windows Phone SDK 7.1 Release Candidate (RC) (formerly named the Windows Phone Developer Tools, and which includes the XNA Game Studio 4.0 Refresh RC as well) was released for download earlier this week.

    The Windows Phone SDK 7.1 RC includes the following changes from the Windows Phone SDK 7.1 Beta 2 release:

    • Go Live license that allows you to use the Windows Phone SDK 7.1 RC to submit applications and games to the Windows Phone Marketplace (as opposed to needing to wait until the final RTW version of the Windows Phone SDK 7.1 to do so).
    • Japanese version of the Windows Phone SDK – we have shipped XNA Game Studio in Japanese in the past, but this RC build enables full Windows Phone development functionality in Japanese as well.
    • The emulator now includes the final Mango phone flash build.
    • Screenshot functionality in the emulator.
    • Profiler improvements, including memory profiling functionality.
    • Marketplace Test Kit that allows you to run some of the same tests that the Windows Phone Marketplace certification process will run and fix issues before you submit your application or game to Marketplace.
    • Visual Studio 2010 Express for Windows Phone now supports NuGet to make it easier to keep Visual Studio add-ins up-to-date.

    Getting Started links

    Here are links to help you get started installing and using the Windows Phone SDK 7.1 RC:

    Documentation links

    Here are some links to useful documentation to help you get started with the Windows Phone SDK 7.1 RC:

    Support links

    Here are some links if you run into questions or issues with the Windows Phone SDK 7.1 RC:

    How to install

    Here are steps you can use to install the Windows Phone SDK 7.1 RC:

    1. If you have any Visual Studio 2010 editions (such as Professional, Ultimate, C# Express, etc) installed on your computer, you will need to install Visual Studio 2010 SP1 first.
    2. If you have the WPDT 7.1 Beta or Windows Phone SDK 7.1 Beta 2 installed, you must uninstall it before installing the Windows Phone SDK 7.1 RC. To uninstall it, you can go to the Programs and Features control panel and uninstall the item named Windows Phone SDK 7.1 (Beta 2) - ENU and that will automatically uninstall all of the beta components that you need to remove before proceeding to install the Windows Phone SDK 7.1 RC.

      Note: If you have the original Windows Phone 7 version of WPDT and/or XNA Game Studio 4.0 installed, you do not need to uninstall them. The Windows Phone SDK 7.1 RC and the XNA Game Studio 4.0 Refresh RC will automatically uninstall the previous version for you behind the scenes. You only need to uninstall previous 7.1 beta builds.

    3. After updating any existing editions of VS 2010 to SP1 and uninstalling any previous beta versions of the Windows Phone SDK that you previously installed, you can proceed with installing the Windows Phone SDK 7.1 RC.

    If you encounter Windows Phone SDK 7.1 Beta 2 setup failures

    If you run into an installation or uninstallation failure for the Windows Phone SDK 7.1 RC, 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 SDK or XNA Game Studio, you can use the cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to remove the Windows Phone SDK or XNA Game Studio.

  • Aaron Stebner's WebLog

    Possible issue related to out-of-order install of XNA Game Studio 4.0 and Windows Phone SDK 7.1

    • 0 Comments

    The Windows Phone SDK 7.1 includes a step to install the XNA Game Studio 4.0 Refresh.  Behind the scenes, the XNA Game Studio 4.0 Refresh installer has logic to detect if the computer has the original version of XNA Game Studio 4.0 installed.  If so, the XNA Game Studio 4.0 Refresh installer will automatically uninstall XNA Game Studio 4.0 because the refresh is a super-set of the original version and there is no need to have both installed at the same time.

    However, there is an installation ordering issue that can end up causing problems.  The original XNA Game Studio 4.0 installer does not have any knowledge about the refresh, so if you run the installer for the original version of XNA Game Studio 4.0 on a computer that already has the XNA Game Studio 4.0 Refresh installed, setup will run in repair mode and it will let you attempt to “repair” XNA Game Studio 4.0.  If you do this, you will end up with a mixed and matched set of components from the original version of XNA Game Studio 4.0 and the XNA Game Studio 4.0 Refresh.  Once a computer gets into this state, attempting to uninstall either one of the versions of XNA Game Studio will only partially remove it because some of the components are shared by both versions.

    If you accidentally install the original version of XNA Game Studio 4.0 onto a computer that already has the XNA Game Studio 4.0 Refresh, here are some steps that will allow you to clean things up and get back to a consistent set of XNA Game Studio 4.0 components:

    1. Go to the Programs and Features control panel.
    2. Uninstall the item named Microsoft XNA Game Studio 4.0.
    3. Uninstall the item named Microsoft XNA Game Studio 4.0 Refresh.
    4. Download the XNA Game Studio cleanup tool and use it to remove XNA Game Studio 4.0 and the XNA Game Studio 4.0 Refresh.
    5. Re-install the XNA Game Studio 4.0 Refresh – you can do this by installing the Windows Phone SDK 7.1 or repairing the Windows Phone SDK 7.1 if you already have that product installed.

    If you try the above steps and run into any installation problems, please go to %temp%\XNA Game Studio 4.0 Setup\Logs, zip all of your setup log files, upload the zip file to a file server (such as http://skydrive.live.com), and then post a comment on this blog post that includes a link that I can use to download your log files and take a closer look.

  • Aaron Stebner's WebLog

    Windows Phone 7 Title Localizer has been updated to include Windows Phone Mango languages

    • 0 Comments

    A while back, I wrote a blog post explaining how to localize the title of a Windows Phone game.  That blog post includes a link to the Windows Phone 7 Title Localizer tool that can be used to quickly create native resource DLLs with localized versions of the game’s title.  A couple of days ago, the creator of this tool released an update so it can now be used to create native resource DLLs for the new Windows Phone Mango languages.

    You can find more information about the tool at http://patrickgetzmann.wordpress.com/wp7-localize/.  You can find a list of steps to localize the title of your Windows Phone game using this tool in this blog post.

  • Aaron Stebner's WebLog

    Content pipeline builds no longer need a D3D device starting in the XNA Game Studio 4.0 Refresh Beta 2

    • 0 Comments

    The Windows Phone SDK 7.1 Beta 2 that was released last week includes the XNA Game Studio 4.0 Refresh Beta 2.  There is a change that we made in the XNA Game Studio 4.0 Refresh between Beta 1 and Beta 2 that I want to highlight because it hasn’t been advertised up to this point.

    Shawn Hargreaves made a change to the content pipeline build process to address a long-standing pain point.  On certain OS configurations, it is now possible to build content via the content pipeline without requiring the ability to create a D3D device.  This means that starting in the XNA Game Studio 4.0 Refresh Beta 2, you can build content in the following types of configurations:

    • If your screen is locked during a build
    • If you are running a build on a headless computer
    • If you are running a build from a non-interactive user account (such as a TFS team build account as previously discussed here, here and here)

    This functionality depends on a D3D API that does not exist on all versions of Windows that are supported by the XNA Game Studio 4.0 Refresh.  Specifically, this functionality is only available on Windows Vista and later.  On Windows XP, the content pipeline will continue to behave the way it has in the past, and it will require the ability to create a D3D device at content build time.

    Assuming you are building your game on a supported OS, this functionality will work equally well for Windows, Xbox 360 and Windows Phone games.

    If you have a build system for your XNA Game Studio game and are looking for more flexibility for your build machine configurations, I encourage you to try out the updated content pipeline build process in the XNA Game Studio 4.0 Refresh.  If you do so, please go to the App Hub forums and let us know if you have any questions or run into any problems.

  • Aaron Stebner's WebLog

    Windows Phone SDK 7.1 Beta 2 and XNA Game Studio 4.0 Refresh Beta 2 now available for download

    • 0 Comments

    As announced on the Windows Phone Developer Blog and on the App Hub web site, the Windows Phone SDK 7.1 Beta 2 (formerly named the Windows Phone Developer Tools, and which includes the XNA Game Studio 4.0 Refresh Beta 2 as well) was released for download earlier this week.

    The Windows Phone SDK 7.1 Beta 2 includes the following changes from the original Windows Phone Developer Tools 7.1 Beta release:

    • Profiler for Windows Phone OS 7.1 applications and games
    • Isolated Storage Explorer that you can use to access isolated storage for your applications and games on a device or the emulator
    • Advertising SDK is now installed as a part of the Windows Phone SDK 7.1 instead of being a separate download
    • Emulator performance and reliability improvements
    • Many bug fixes across all features of the tools and runtime

    Getting Started links

    Here are links to help you get started installing and using the Windows Phone SDK 7.1 Beta 2:

    Documentation links

    Here are some links to useful documentation to help you get started with the Windows Phone SDK 7.1 Beta 2:

    Support links

    Here are some links if you run into questions or issues with the Windows Phone SDK 7.1 Beta 2:

    How to install

    Here are steps you can use to install the Windows Phone SDK 7.1 Beta 2:

    1. If you have any Visual Studio 2010 editions (such as Professional, Ultimate, C# Express, etc) installed on your computer, you will need to install Visual Studio 2010 SP1 first.
    2. If you have the original WPDT 7.1 Beta installed, you must uninstall it before installing the Windows Phone SDK 7.1 Beta 2.  To uninstall it, you can go to the Programs and Features control panel and uninstall the item named Microsoft Windows Phone Developer Tools 7.1 Beta - ENU and that will automatically uninstall all of the beta components that you need to remove before proceeding to install the Windows Phone SDK 7.1 Beta 2.

      Note: If you have the original Windows Phone 7 version of WPDT and/or XNA Game Studio 4.0 installed, you do not need to uninstall them.  The Windows Phone SDK 7.1 Beta 2 and the XNA Game Studio 4.0 Refresh Beta 2 will automatically uninstall the previous version for you behind the scenes.  You only need to uninstall previous 7.1 beta builds.

    3. After updating any existing editions of VS 2010 to SP1 and uninstalling any previous beta versions of WPDT that you previously installed, you can proceed with installing the Windows Phone SDK 7.1 Beta 2.

    If you encounter Windows Phone SDK 7.1 Beta 2 setup failures

    If you run into an installation or uninstallation failure for the Windows Phone SDK 7.1 Beta 2, 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 the Windows Phone SDK or XNA Game Studio.

    <update date="7/5/2011"> Added a link to download the Windows Phone SDK 7.1 Beta 2 ISO image. </update>

     

  • Aaron Stebner's WebLog

    How to create a solution with XNA Game Studio 4.0 Windows Phone 7.0 and 7.1 projects

    • 0 Comments

    The Windows Phone Developer Tools 7.1 allows you to create applications and games that target both Windows Phone OS 7.0 and Windows Phone OS 7.1.  In some cases, you may want to create separate versions of an application or game that target both versions of the Windows Phone OS and that share common code.  There is not a way to automatically create a Visual Studio solution and projects to do that.  Here are some manual steps you can use to create XNA Game Studio 4.0 projects that target Windows Phone 7.0 and 7.1 and that share code and content:

    1. Create a new XNA Game Studio 4.0 Windows Phone game project that targets Windows Phone OS 7.0.
    2. Close the solution.
    3. Create a new XNA Game Studio 4.0 Windows Phone game project that targets Windows Phone OS 7.1.
    4. Close the solution.
    5. Copy the project file from step 3 above into the same directory as the project from step 1.
    6. Update the RootNamespace and AssemblyName values in the project from step 3 to match the values in the project from step 1.
    7. Update the OutputPath values for each build configuration in the projects from step 1 and step 3 so that each project will build to unique output locations.
    8. Update the content reference in the project from step 3 to point to the same content project as the project from step 1.
    9. If needed, add a new value to the DefineConstants list in the projects from step 1 and step 3 so that you can IFDEF code to compile only for the Windows Phone 7.0 and/or Windows Phone 7.1 project.
    10. Update the solution (.sln) file from step 1 to include the project from step 3.

    You can find a sample solution that I created that I have already completed all of the above steps for at http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/WPGameMultiTargetingSample.zip.

    The above steps will create a solution and a set of projects that behave differently than a traditional multi-platform solution in XNA Game Studio that is created by starting a project for one platform and then creating a copy of it for another platform via the Create Copy of Project menu item in the Visual Studio IDE.  Projects created with Create Copy of Project will be automatically synchronized behind the scenes so that if you add, remove or rename a file in one project, it is reflected in the other copies.  After completing the above steps, you will need to make sure that you manually synchronize any file add, remove or rename operations.  Changing code within files that have already been added to both projects will be picked up when you build either one of the projects though.

  • Aaron Stebner's WebLog

    How to manually downgrade an XNA Game Studio Windows Phone 7.1 game project back to 7.0

    • 0 Comments

    The Windows Phone Developer Tools 7.1 allows you to create and develop applications and games that target both Windows Phone OS 7.0 and Windows Phone OS 7.1.  The Visual Studio project file for an application or game can only target one version of the Windows Phone OS.  You can upgrade a project that targets 7.0 to target 7.1 in the Visual Studio UI, but once you upgrade, you cannot downgrade it from the Visual Studio UI.  Because of that, the upgrade UI recommends making a backup of your 7.0 project before proceeding with the upgrade process.

    If you have an XNA Game Studio Windows Phone 7.0 game project that you have upgraded to 7.1 and you didn’t make a backup copy before the upgrade, you can use the following steps to manually downgrade it to 7.0:

    1. Make sure that your project and solution are not open in Visual Studio
    2. Open the project file (*.csproj or *.vbproj) in a text editor such as Notepad
    3. Locate the following property value:

      <XnaRefreshLevel>1</XnaRefreshLevel>

    4. Remove the property value entirely or set the value to 0
    5. Re-open the project in Visual Studio
  • Aaron Stebner's WebLog

    Possible issue installing the Windows Phone Developer Tools 7.1 beta caused by incompatible components

    • 5 Comments

    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:

    1. Open the file %temp%\dd_install_vm_xcor2_100.txt and determine the exact components that WPDT setup has identified as incompatible.  The incompatible products will generate log file entries like the following:

      [05/27/11,10:49:40] VS Scenario: ***ERRORLOG EVENT*** : Error: CVSScenario::ExecuteEachBlocker returned false
      [05/27/11,10:49:40] Setup.exe: AddGlobalCustomProperty
      [05/27/11,10:49:40] VS Scenario: ***ERRORLOG EVENT*** : Error:There is a blocking condition met, the installer is blocking because of Section :
      [05/27/11,10:49:40] Setup.exe: AddGlobalCustomProperty
      [05/27/11,10:49:40] VS Scenario: ***ERRORLOG EVENT*** : Microsoft Visual C# Express 2010

    2. Look in the WPDT setup data file named blocker.sdb to determine the exact registry key that is being used to detect each incompatible product.  Blocker.sdb is located in the vm_web.exe self-extracting setup package, and I have posted an extracted copy at this location.  For the product in the above example, the information in blocker.sdb looks like the following:

      [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.

    3. Use the Programs and Features control panel to uninstall the product that is triggering the block.

    4. Restart the computer.

    5. In some cases, uninstalling the product will not remove the registry key that WPDT setup is checking for in blocker.sdb.  In those cases, you may have to manually rename or delete the registry value so that the block will no longer be triggered.

    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>

     

  • Aaron Stebner's WebLog

    Windows Phone Developer Tools 7.1 Beta and XNA Game Studio 4.0 Beta now available for download

    • 0 Comments

    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:

    1. If you have any Visual Studio 2010 editions (such as Professional, Ultimate, C# Express, etc) installed on your computer, you will need to install Visual Studio 2010 SP1 first.
    2. If you have the original Windows Phone 7 version of WPDT and/or XNA Game Studio 4.0 installed, you do not need to uninstall them.  The WPDT 7.1 Beta and the XNA Game Studio 4.0 Refresh Beta will automatically uninstall the previous version for you behind the scenes.
    3. After updating any existing editions of VS 2010 to SP1, you can proceed with installing the WPDT 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.

  • Aaron Stebner's WebLog

    Possible cause of error code 1719 or 1723 when installing a 64-bit MSI

    • 17 Comments

    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

    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.

  • Aaron Stebner's WebLog

    Guide.IsTrialMode behavior change in XNA Game Studio 4.0 games for Windows Phone

    • 0 Comments

    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:

    • This performance problem only manifests itself when a game is downloaded from the Windows Phone Marketplace – you will not see it when running your game in the emulator or when using Guide.SimulateTrialMode on a device during development.

    The following points from my previous blog post still apply, and should be taken into account when implementing trial mode functionality in your game:

    • On Windows Phone, calling Guide.IsTrialMode can be expensive (~60 milliseconds per call), so it should not be called every frame in your game code.
    • This performance problem does not occur on Xbox 360, so pay particular attention to how you are using Guide.IsTrialMode if you are porting a game from the Xbox 360 to Windows Phone.
    • You should consider checking the trial mode state at startup (specifically, in your Activated event handler) and at key intervals during your game instead of every frame.  For example, if you have a functionality-limited trial mode, you could check the state at the end of the last level that is a part of your trial experience and determine whether or not to unlock subsequent levels.

    <update date="5/5/2011"> Added a clarifying note to recommend that the trial check be done in the Activated event handler. </update>

     

  • Aaron Stebner's WebLog

    Installing offline documentation for XNA Game Studio 4.0

    • 0 Comments

    A while back, I wrote a blog post explaining how to install offline documentation for the Windows Phone Developer Tools.  Up until recently, those steps worked for the Windows Phone Development documentation, but not the XNA Game Studio 4.0 documentation.  It has taken a little while, but the XNA Game Studio 4.0 documentation can now be downloaded for offline viewing using these steps as well.  This will allow you to access help by pressing F1 within Visual Studio during XNA Game Studio development even if you are working offline.

  • Aaron Stebner's WebLog

    Mailbag: Can I install Windows Phone Developer Tools without the Visual Studio 2010 Express for Windows Phone edition?

    • 4 Comments

    Question:

    I already have Visual Studio 2010 Professional installed, and I would like to use it for Windows Phone development.  The Windows Phone Developer Tools installs Visual Studio 2010 Express for Windows Phone, which I don’t intend to use.  Is there a way that I can install the Windows Phone Developer Tools without installing this express edition?

    Answer:

    No, there is not a version of the Windows Phone Developer Tools that does not include the Visual Studio 2010 Express for Windows Phone edition.  That means that you will always have to download and install the express edition in order to develop Windows Phone applications or games.  You cannot eliminate the download size or the install time.  However, most of the files that are a part of the express edition are also a part of the professional and higher editions, so there is only minimal extra disk space taken up by the express edition after installation completes.

    There are a couple of important notes to keep in mind related to this express edition:

    1. Because it includes a Visual Studio 2010 express edition in its installer, if you install the Windows Phone Developer Tools after you install Visual Studio 2010 SP1, you must re-apply Visual Studio 2010 SP1 afterwards.
    2. Even if you do not intend to use the express edition, it will be available on your computer after Windows Phone Developer Tools installation completes, and double-clicking on a .sln file may cause it to open in the express edition instead of in the professional or higher edition.  There is some information in this blog post about how to force a .sln file to open in the professional or higher edition instead of in the express edition.
  • Aaron Stebner's WebLog

    Links to new game development page and tutorials on the App Hub site

    • 0 Comments

    As announced this morning on the XNA Game Studio team blog, there is a new game development landing page and a new game development tutorial available on the App Hub site.  Here is some information about each of these new pages.

    Game Development Landing Page

    The landing page is available at http://create.msdn.com/education/gamedevelopment.  It includes the following types of information:

    Game Development Tutorial

    The tutorial is available at http://create.msdn.com/education/tutorial/2dgame/getting_started.  It includes a video and a code guide that present the key concepts to teach game design, art, and programming skills.

  • Aaron Stebner's WebLog

    ClickOnce publishing does not work for an XNA Game Studio 4.0 Windows game upgraded from 3.0 or 3.1

    • 0 Comments

    A customer on the App Hub forums ran into an issue that I wanted to describe in more detail here in case anyone else runs into it in the future.  If you have a Windows game project created with XNA Game Studio 3.0 or 3.1 and upgrade it to XNA Game Studio 4.0, ClickOnce publishing will not work correctly.  This happens because the prerequisites for the game still include the older versions of the .NET Framework and the XNA Framework Redistributable that were needed by XNA Game Studio 3.0 or 3.1.

    If you have upgraded a Windows game from XNA Game Studio 3.0 or 3.1 to 4.0 and want to be able to use the publish command to create a ClickOnce installer for it, you can use the following workaround:

    1. Open your XNA Game Studio 3.1 Windows game project in a supported VS 2010 edition (Professional, Premium, Ultimate, Visual C# 2010 Express, Visual Studio 2010 Express for Windows Phone)
    2. Follow the steps in the Visual Studio Conversion Wizard to upgrade the project to XNA Game Studio 4.0
    3. After upgrade is complete, update your game code to address any breaking changes between the XNA Framework 3.1 and 4.0
    4. Right-click on the project in the Visual Studio solution explorer and choose Properties
    5. Click on the Publish tab on the left side of the Properties window
    6. Click on the Prerequisites… button
    7. In the Prerequisites dialog, check the item named Microsoft .NET Framework 4 Client Profile (x86 and x64), uncheck any other .NET Framework versions that are currently checked, and uncheck the Microsoft XNA Framework Redistributable 3.1
    8. Save your project and publish your project to create a ClickOnce package and a setup.exe bootstrapper for it
  • Aaron Stebner's WebLog

    Link to new Windows Phone 7 game development book by 2 XNA MVPs

    • 0 Comments

    A couple of weeks ago, I got the opportunity to meet and chat with several XNA and DirectX MVPs at the 2011 MVP Summit on the main Microsoft campus in Redmond, Washington.  At the summit, a couple of the MVPs, Chris Williams and George Clingerman, were autographing copies of their new book, Professional Windows Phone 7 Game Development – Creating Games Using XNA Game Studio 4.

    The book was released in February 2011, and it provides in-depth information about developing and publishing Windows Phone 7 games using XNA Game Studio 4.0, including 3 complete games.  If you are looking into developing games using XNA Game Studio and the Windows Phone 7 platform, I encourage you to check out this book.  You can find it on Amazon.com and at other retailers.

  • Aaron Stebner's WebLog

    How to open a Windows Phone .sln file in Visual Studio 2010 Professional instead of Visual Studio 2010 Express for Windows Phone

    • 3 Comments

    Question:

    I have a Windows Phone project that was created by somebody else, and when I double-click on the .sln file, it opens in Visual Studio 2010 Express for Windows Phone.  I have Visual Studio 2010 Professional installed and would prefer to use that for my Windows Phone development scenarios.  How can I force Windows Phone .sln file to open in Visual Studio 2010 Professional instead of Visual Studio 2010 Express for Windows Phone?

    Answer:

    In your scenario, the .sln was originally created in the Visual Studio 2010 Express for Windows Phone edition.  The general philosophy used by Visual Studio is to try to open a .sln in the exact edition that it was originally created in, and then to fall back to other supported Visual Studio editions in the same product family if that exact edition is not installed.

    There are a few options you can use to cause a Windows Phone .sln file to open in Visual Studio 2010 Professional by default.

    Option 1 – Update the metadata in the .sln file

    You can open the .sln file in a text editor such as Notepad and change the following value at the top of the file:

    # Visual Studio 2010 Express for Windows Phone

    To cause the .sln to open in Visual Studio 2010 Professional by default, change the above line to the following:

    # Visual Studio 2010

    After you change that value and save and close your .sln file, double-clicking on the .sln will cause it to attempt to be opened in Visual Studio 2010 Professional (or Premium or Ultimate) if that edition is installed on your computer.  It will still fall back to trying the express edition if Visual Studio 2010 Professional is not installed.

    Note – when using this option, you will have to change the metadata in every .sln file that you want to change the default behavior for.

    Option 2 – Update the default verb handler for the .sln extension

    You can right-click on a .sln, choose Open With, then Choose Default Program.  It is usually set to the Microsoft Visual Studio Version Selector by default.  You can browse to the Visual Studio 2010 version of devenv.exe and force the computer to open .sln files with Visual Studio 2010 Professional instead of the version selector.

    This option will change the behavior for all .sln files opened on the computer, including .sln files created in other Visual Studio product families (such as Visual Studio 2005 or 2008).  This option typically does not work well if you have multiple Visual Studio editions from different product families installed side-by-side and you regularly use .sln files from multiple Visual Studio product families on the same computer.

    Option 3 – Rename the vpdexpress.exe program

    You can rename the Visual Studio 2010 Express for Windows Phone executable (vpdexpress.exe), and this will cause the Visual Studio version selector to think that the express edition is not installed.  That will cause the .sln to open in Visual Studio 2010 Professional even if the metadata in the .sln file says that the .sln file was created with the express edition.

    This option is the most invasive, but allows you to avoid needing to update each .sln file, and it does not affect the ability to open .sln files created with other Visual Studio product families.

  • Aaron Stebner's WebLog

    Possible workarounds for localization build issues in XNA Game Studio 4.0 Windows Phone games

    • 0 Comments

    Recently, we have run into a few issues where XNA Game Studio 4.0 Windows Phone games did not display proper localized strings when changing the phone OS language.  We narrowed down these issues to problems in the game .csproj file that ended up preventing localized resource DLLs from being correctly packaged into the XAP file and deployed to the phone.  These issues are pretty subtle and easy to miss, so I wanted to describe them in a bit more detail in case anyone else runs into these issues in the future.

    Note – the issues in this post are specific to XNA Game Studio projects for Windows Phone.  Localized resource DLLs will be correctly packaged in Silverlight projects for Windows Phone regardless of the format that you use for the <SupportedCultures> tag.

    Issue 1 – <SupportedCultures> elements are case-sensitive

    The list of supported cultures is case-sensitive for XNA Game Studio 4.0 Windows Phone projects.  This means that the cultures that you list in the <SupportedCultures> property in your .csproj file must exactly match the culture names used in the *.resx files in your project and the *.resources.dll files that are built with your project.

    For example, if you have a file named strings.fr-FR.resx in your project, you must put the following in your .csproj:

    <SupportedCultures>fr-FR</SupportedCultures>

    If you put the following in your .csproj instead of what is listed above, then the French strings.resources.dll that is built from strings.fr-FR.resx may not be packaged into the XAP file for your game (which means that the strings will not be available at runtime on the phone after you deploy your game):

    <SupportedCultures>fr-fr</SupportedCultures>

    Issue 2 – <SupportedCultures> property cannot be split across lines

    By default, a new XNA Game Studio 4.0 Windows Phone project includes a blank list of supported cultures that looks like the following:

    <SupportedCultures>
    </SupportedCultures>

    When you add cultures to the <SupportedCultures> property in your .csproj, you must move the closing </SupportedCultures> tag to the same line instead of leaving it on a separate line.  For example:

    <SupportedCultures>en;fr;it;de;es</SupportedCultures>

    If you put the following in your .csproj instead of what is listed above, then the *.resources.dll files that are built or referenced by your project will not be packaged into the XAP file for your game (which means that the strings will not be available at runtime on the phone after you deploy your game):

    <SupportedCultures>en;fr;it;de;es
    </SupportedCultures>

    Issue 3 – <SupportedCultures> property might not exist in the .csproj

    By default, a new XNA Game Studio 4.0 Windows Phone project includes a blank list of supported cultures that looks like the following:

    <SupportedCultures>
    </SupportedCultures>

    However, projects created with previous CTP or beta builds of the Windows Phone Developer Tools will not have a <SupportedCultures> property in the .csproj.  In order to correctly package *.resources.dll files for your game, you will need to add a <SupportedCultures> property to your .csproj and provide the appropriate list of cultures.  You should add the <SupportedCultures> property to the first <PropertyGroup> in your .csproj.

  • Aaron Stebner's WebLog

    Registration is now open for the Dream.Build.Play 2011 Challenge

    • 0 Comments

    As announced earlier today on the XNA Game Studio team blog, registration is now open for the Dream.Build.Play 2011 Challenge.  Here is a quick summary of the key information about the Dream.Build.Play 2011 Challenge:

    • Registration is open from February 28, 2011 through May 17, 2011
    • Game submission will be open from May 17, 2011 through June 14, 2011
    • The contest is open to Xbox 360 games created with XNA Game Studio 4.0
    • Prizes include $75000 divided amongst the top 4 games, and opportunity to have your game reviewed for a possible Xbox LIVE Arcade publishing contract

    I encourage you to check out the Dream.Build.Play 2011 web site for more detailed information and to register for the contest.

Page 3 of 48 (1,187 items) 12345»