Aaron Stebner's WebLog

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

February, 2011

  • Aaron Stebner's WebLog

    Confusing error when attempting to debug an XNA Game Studio 4.0 Windows Phone game in Visual C# 2010 Express

    • 1 Comments

    XNA Game Studio 4.0 supports the following editions of Visual Studio 2010:  Visual Studio 2010 Professional and better, Visual C# 2010 Express, and Visual Studio 2010 Express for Windows Phone.  However, as described in more detail in this blog post, XNA Game Studio 2010 does not support developing games for all platforms in all of these Visual Studio 2010 editions.  There is a specific unsupported scenario that gives a pretty poor error message if you try it, and I want to describe it in a little more detail here in case anyone runs into it while using XNA Game Studio 4.0.

    Description of the issue

    You can create XNA Game Studio 4.0 Windows Phone game projects in Visual Studio 2010 Professional and better or Visual Studio 2010 Express for Windows Phone, but not in Visual C# 2010 Express.   However, because the overall XNA Game Studio 4.0 project system supports Visual C# 2010 Express, you can open XNA Game Studio 4.0 Windows Phone game projects that were created elsewhere in Visual C# 2010 Express.  If you do this, you can edit the phone game projects and build them with no errors.  If you attempt to press F5 to deploy and debug a phone game, you will see an error like the following:

    Unable to start debugging.

    An error occurred that usually indicates a corrupt installation (code 0x80040154). If the problem persists, repair your Visual Studio installation via 'Add or Remove Programs' in Control Panel.

    Repairing Visual C# 2010 Express will not help in this scenario.  There are certain components that are required for Windows Phone development that are only available in Visual Studio 2010 Professional and better or Visual Studio 2010 Express for Windows Phone, and as a result, you cannot deploy or debug Windows Phone game projects in Visual C# 2010 Express.

    How to work around this issue

    If you run into the above error, you will need to open your Windows Phone game project (.csproj) file in one of the supported Visual Studio 2010 editions and deploy and debug it from there instead.

    A note about Silverlight Windows Phone projects

    One other note about this scenario – if you attempt to open a Silverlight Windows Phone application project that was created elsewhere in Visual C# 2010 Express, you will see an error like the following and will not even be allowed to open it:

    error : The project file 'C:\Users\myuser\Documents\Visual Studio 2010\Projects\WindowsPhoneApplication1\WindowsPhoneApplication1\WindowsPhoneApplication1.csproj' cannot be opened.

    The project type is not supported by this installation.

    This message error is more clear, and it prevents you from being able to edit or build the project as well, which helps reinforce the lack of support for Visual C# 2010 Express in a way that XNA Game Studio 4.0 does not.  The reason that Silverlight projects are able to present more clear errors in this type of scenario is that the Silverlight Windows Phone project system does not support Visual C# 2010 Express at all, whereas the XNA Game Studio 4.0 project system supports Visual C# 2010 Express, but not for all types of game projects.

  • Aaron Stebner's WebLog

    Possible installation issues with the Windows Phone Developer Tools January 2011 Update

    • 1 Comments

    As I mentioned in a previous blog post, the Windows Phone Developer Tools January 2011 Update was released a few days ago.  Since then, I’ve heard from a few people who have reported installation issues that I wanted to describe in a bit more detail in case others run into them in the future.

    Issue 1 – Windows Phone Developer Resources patch silently exits when it is done installing

    The Windows Phone Developer Resources patch that is a part of the Windows Phone Developer Tools January 2011 Update only displays a small dialog with a progress bar during the installation process.

    The installation process can take a long time on some computers because it needs to re-generate the saved state file for the updated emulator image, and it may appear to be hung with the progress bar registering 100% complete while it does this.  You should not not try to close setup or kill it with the Task Manager during this time. 

    When the installation process completes, the small dialog with the progress bar disappears, but there is no indicator that setup is complete or that it succeeded.  You can determine whether or not this patch successfully installed by doing the following (this is copied from the January 2011 Update release notes):

    1. Go to the Programs and Features control panel (you can get to this quickly by typing appwiz.cpl in the Start menu search bar).
    2. On the left side of the Programs and Features control panel, click the link named View installed updates.
    3. If the update installed successfully, you will see Microsoft Windows Phone 7 Developer Resources - January 2011 Update in the list of installed updates.

    Issue 2 – Visual Studio patch fails on a system that has the Visual Studio 2010 SP1 beta installed

    The Visual Studio patch that is a part of the Windows Phone Developer Tools January 2011 Update will not install correctly if the computer it is being installed on has the Visual Studio 2010 SP1 beta installed.  If you have the Visual Studio 2010 SP1 beta, you will need to uninstall it and then use the following steps to restore Visual Studio 2010 before you can install the Visual Studio patch:

    1. Go to the Programs and Features control panel and uninstall the item named Microsoft Visual Studio 2010 Service Pack 1.
    2. Run setup.exe from the location that you originally installed Visual Studio 2010 from.  If you are prompted by User Account Control to elevate, click Continue.
    3. Click Change or Remove Microsoft Visual Studio 2010.
    4. Once setup finishes loading, click Next.
    5. Click Add or Remove Features.
    6. Re-check any of the features you want to repair. If the features that you want to repair are already checked, you will need to uncheck and recheck them.
    7. Click the Update button.
  • Aaron Stebner's WebLog

    Link to samples that merge the XNA Game Studio 4.0 platformer starter kit with the game state management sample

    • 1 Comments

    I found a link on the App Hub forums today that I wanted to pass on.  Jim Perry, one of the XNA MVPs, has posted a Windows version of the XNA Game Studio 4.0 platformer starter kit that is merged with the game state management sample to provide a full menu system for the game.  He posted the base version and all of the extended versions of the platformer starter kit (extra lives, scrolling level, power ups).

    You can find the blog post and download links at http://machxgames.com/blog/?p=27.

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

  • Aaron Stebner's WebLog

    WiX v3.5 has released

    • 0 Comments

    Rob Mensching posted an item on his blog today declaring WiX v3.5 complete.  The final build number is 3.5.2519.0 and it can be downloaded from http://wix.codeplex.com/releases/view/60102.

    Here are a few brief highlights of what is included in WiX v3.5:

    • Votive support for Visual Studio 2010
    • IIS7 custom actions
    • Bug fixes to the core toolset
    • Simplifications for common setup authoring tasks (such as major upgrades and simpler component authoring)
    • Adding patch UI dialogs to WixUI and adding several new localized WixUI languages
  • Aaron Stebner's WebLog

    Mailbag: Why is the .NET Framework still listed in the Programs and Features control panel after running the cleanup tool?

    • 0 Comments

    Question:

    I ran the .NET Framework cleanup tool and removed all versions of the .NET Framework from my computer.  Why do I still see the .NET Framework listed in the Programs and Features control panel after removing it with the cleanup tool?

    Answer:

    Just because an item is listed in the Programs and Features control panel (on Windows Vista and higher) or the Add/Remove Programs control panel (on Windows XP, Windows Server 2003 and earlier), it does not mean that the product is actually installed.  The Programs and Features control panel lists all items that appear in a specific part of the registry.

    On a 32-bit OS:

    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

    On a 64-bit OS:

    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
    • HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

    The .NET Framework cleanup tool removes some of the .NET Framework-related registry keys at the above locations, but it does not have the ability to remove those registry keys for every previously shipped .NET Framework hotfix.  As a result, the .NET Framework might still appear in the list of installed programs in the Programs and Features control panel even after running the cleanup tool.

    Please note that the .NET Framework cleanup tool is not designed to be a replacement for the standard .NET Framework uninstall process.  It is only designed as a last resort for cases where install, uninstall, repair or patch installation did not succeed for unusual reasons.  You should always try the uninstall steps listed in this blog post before resorting to using the .NET Framework cleanup tool.

  • Aaron Stebner's WebLog

    Windows Phone Developer Tools January 2011 Update is now available for download

    • 0 Comments

    As announced earlier today in this post on the Windows Phone Developer Blog and in this news item on the App Hub site, the Windows Phone Developer Tools January 2011 Update is now available for download.

    How to install the update?

    The Windows Phone Developer Tools January 2011 Update consists of 2 patches that install on top of the original Windows Phone Developer Tools RTW release, so you must install all of the following items in order to fully install the update:

    You do not need to uninstall the Windows Phone Developer Tools October 2010 Update if you previously installed it.  The January 2011 Update will install over the top of it and will replace it.

    Note – in some cases, installing the patches can cause the default deployment target to change from the Windows Phone 7 Emulator to the Windows Phone 7 Device.  If that happens on your computer, you can use the steps listed in this blog post to reset the default deployment target.

    What is included in the update?

    The Windows Phone Developer Tools January 2011 Update includes an updated version of the Windows Phone 7 Emulator.  The updated emulator adds support for copy and paste functionality so that developers can test this functionality in their applications.  It also includes several bug fixes and performance enhancements.  Note that this functionality will not be available to Windows Phone 7 devices until a future update is released.

    In addition, because it is a cumulative update, this update also includes the following components that originally shipped in the Windows Phone Developer Tools October 2010 Update:

    • The Windows Phone Connect tool – this tool allows the Windows Phone Developer Tools to connect to a Windows Phone device without requiring the Zune software to be running; this allows developers to debug media playback scenarios on a device
    • The Windows Phone capability detection tool – this tool analyzes your Windows Phone game or application project and detects the capabilities that are required; this allows developers to update their WMAppManifest.xml file so they can test their game or application with the same set of capabilities that will be provided by the ingestion process
    • An updated version of the Bing Maps control

    Who should install this update?

    I encourage all developers creating applications or games for Windows Phone 7 to install this update.  It makes the process of developing, testing and submitting to the Windows Phone Marketplace more smooth, and provides emulator support for upcoming Windows Phone 7 OS functionality so you can start testing your applications and games with these changes before the OS update is released.

    In nearly all cases, applications and games that have already been released will not need to be recompiled or resubmitted to the Windows Phone Marketplace as a result of this update.  There is a specific scenario where a recompile and resubmit is encouraged – if you have pivot or panorama controls that contain text boxes, users can unintentionally change panes when trying to use the new copy and paste feature to copy text into the text box. To prevent this problem, you can install the Windows Phone Developer Tools January 2011 Update, open your application, recompile it, and then resubmit it to the Windows Phone Marketplace.

    Getting started links

    Here are some download links to help you get started with the Windows Phone Developer Tools January 2011 Update:

    Here are some documentation links to help you get started with new features:

Page 1 of 1 (7 items)