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.
You previously posted lists of command line switches to perform silent and unattended installations of the Visual C++ 2005 redistributable and the Visual C++ 2008 redistributable. How can I perform silent and unattended installations of the Visual C++ 2010 redistributable?
The Visual C++ 2010 redistributable packages (vcredist_x86.exe, vcredist_x64.exe and vcredist_ia64.exe) support the following command line installation options.
The examples below use the file named vcredist_x86.exe, but you can substitute the x64 or ia64 versions of the EXEs with equivalent command lines to achieve the same behavior for them as well.
This option will suppress all UI and perform an install.
<full path>\vcredist_x86.exe /q /norestart For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this: c:\vc2010redist\vcredist_x86.exe /q /norestart
<full path>\vcredist_x86.exe /q /norestart
For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this:
c:\vc2010redist\vcredist_x86.exe /q /norestart
This option will display a progress dialog (but requires no user interaction) and perform an install.
<full path>\vcredist_x86.exe /passive /norestart For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this: c:\vc2010redist\vcredist_x86.exe /passive /norestart
<full path>\vcredist_x86.exe /passive /norestart
c:\vc2010redist\vcredist_x86.exe /passive /norestart
This option will suppress all UI and perform a repair.
<full path>\vcredist_x86.exe /q /repair /norestart For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this: c:\vc2010redist\vcredist_x86.exe /q /repair /norestart
<full path>\vcredist_x86.exe /q /repair /norestart
c:\vc2010redist\vcredist_x86.exe /q /repair /norestart
This option will suppress all UI and perform an uninstall.
<full path>\vcredist_x86.exe /q /uninstall /norestart For example, if you download vcredist_x86.exe to a folder named c:\vc2010redist, then the command line would look like this: c:\vc2010redist\vcredist_x86.exe /q /uninstall /norestart
<full path>\vcredist_x86.exe /q /uninstall /norestart
c:\vc2010redist\vcredist_x86.exe /q /uninstall /norestart
A note about reboots
All of the examples above use the /norestart switch to suppress reboots after the setup process completes. The /norestart switch does not eliminate the need to reboot entirely – it just gives the calling process control over when to schedule the reboot if one is needed due to files being in use during setup. If you run the Visual C++ 2010 redistributable setup and use the /norestart switch, you must check the exit code returned by the setup process and handle it accordingly in the calling process. Here are the possible exit codes:
In past releases, we have published XNA Game Studio developer education content on the Creators Club site, and we have continued to do so as new XNA Game Studio 4.0 content is published. The recently released XNA Game Studio 4.0 integrates into the Visual Studio 2010 family of products. Visual Studio 2010 has some new features to provide direct access from the VS IDE to tools and developer education content hosted on the Visual Studio Gallery web site.
XNA Game Studio 4.0 sample content on the VS Gallery
We’ve started converting some of the XNA Game Studio 4.0 samples into project templates and publishing them on the Visual Studio Gallery in addition to posting them on the Creators Club site. We created an account named XNA GS Education on the VS Gallery web site and have posted an initial set of project templates for XNA Game Studio 4.0 content using that account. You can see a full list of available content on the VS Gallery web site, and you can find XNA Game Studio 4.0 sample content in the Visual Studio 2010 New Project dialog and in the Extension Manager.
In addition, anyone inside or outside of Microsoft can post their own sample content on the VS Gallery web site and it will show up in the same locations in the VS IDE as the content that we are uploading. The packaging process is a little tricky – it requires creating a VS 2010 project template and then creating a .vsix file with some specific settings. We are thinking about ways that we can make the VS Gallery publishing process easier for the XNA Game Studio team and the community. For now, this is a somewhat manual process, and that is why there is currently only a small amount of XNA Game Studio content aside from the entries that our team has published.
Accessing online templates via the Visual Studio 2010 New Project dialog
XNA Game Studio sample content is available within the New Project dialog in Visual Studio 2010, Visual C# 2010 Express and Visual Studio 2010 Express for Windows Phone. To access this content via the New Project dialog, you can do the following:
Accessing online templates, controls and tools via the Visual Studio 2010 Extension Manager
XNA Game Studio sample content is available in Extension Manager in Visual Studio 2010. The Extension Manager is not available in Visual C# 2010 Express or Visual Studio 2010 Express for Windows Phone. To access this content via Extension Manager, you can do the following:
In general, I tend to use the New Project dialog to access this XNA Game Studio sample content, even if I’m using an edition of VS 2010 that supports Extension Manager because I prefer the simpler experience of installing + instantiating the template in a single step that is the same as the step I use to instantiate one of the in-box project templates.
If you are an XNA Game Studio developer, I encourage you to install a VS 2010 edition and XNA Game Studio 4.0 if you haven’t yet and check out some of the great sample content available directly from the VS 2010 IDE.
Since XNA Game Studio 4.0 and the Windows Phone Developer Tools shipped a couple of weeks ago, I’ve run into some common questions about the supported OS and Visual Studio matrix, so I decided to try to create a couple of tables to better illustrate what XNA Game Studio 4.0 functionality you can use where and provide a little more detail about the install scenarios.
XNA Game Studio 4.0 – how to install
You can download and install XNA Game Studio 4.0 two different ways:
1. As an integrated part of the Windows Phone Developer Tools
2. As a standalone XNA Game Studio 4.0 package
The following tables provide different views into what functionality is supported where.
XNA Game Studio 4.0 – Supported Visual Studio editions
The following table shows what type of games you can develop with XNA Game Studio 4.0 in what editions of Visual Studio 2010.
In the table above, Yes* means that the scenario is supported, but only if you install the Windows Phone Developer Tools. It is not supported if you only install the standalone XNA Game Studio 4.0 product.
XNA Game Studio 4.0 – Supported operating systems
The following table shows what type of games you can develop with XNA Game Studio 4.0 on what versions of Windows.
Windows Phone Developer Tools and Visual Studio editions
Windows Phone Developer Tools setup will always install Visual Studio 2010 Express for Windows Phone (vpdexpress.exe), even if you already have another edition of Visual Studio 2010 installed. If you have Visual Studio 2010 Professional, Premium or Ultimate installed, WPDT setup will add Windows Phone development features to those editions of Visual Studio 2010 as well.
WPDT setup has somewhat confusing logic about what shortcuts it creates for Visual Studio 2010 editions. If it detects that you to not have Visual Studio 2010 Professional, Premium or Ultimate installed, it will create a shortcut to Visual Studio 2010 Express for Windows Phone (vpdexpress.exe). If it detects that you do have Visual Studio 2010 Professional, Premium or Ultimate installed, it will not create a shortcut to Visual Studio 2010 Express for Windows Phone (vpdexpress.exe), but it is still installed behind the scenes in case you want to use it. Regardless of what start menu shortcuts appear after installation, you can launch the supported Visual Studio 2010 editions for XNA Game Studio 4.0 development directly from the following locations (these locations assume that you have installed Visual Studio 2010 to the default location):
Note – in the paths above, you should substitute %ProgramFiles(x86)% for %ProgramFiles% if you are running a 64-bit version of Windows.
Michael Klucher wrote a blog post earlier this week that included some information about Windows Phone icon sizes for games and applications. I wanted to provide a little more information about where each icon image is used and also give some suggestions for how to test your game icons in the emulator. Here is a summary of what this blog post covers:
Windows Phone 7 icon types
The Windows Phone Developer Tools allows you to configure 2 different types of application icons:
Windows Phone 7 icon sizes
The Windows Phone 7 OS displays application icons in 2 different sizes, depending on where they appear:
Configuring your project as an application or a game
The location that your application appears in the Windows Phone 7 OS depends on whether you have configured it to be an application or a game. During development, this setting is controlled by the Genre value in the file \Properties\WMAppManifest.xml. When you get ready to submit your application or game to the Windows Phone Marketplace, you will be asked in a web form whether it is an application or a game. The ingestion process will take the value that you select there and overwrite whatever you list in the file \Properties\WMAppManifest.xml in the project you submit.
The technology used to create the application or game does not matter. In other words, although the default experience is to create games with XNA Game Studio and applications with Silverlight, you can also create applications with XNA Game Studio and games with Silverlight if you want to.
Deployment details for games
Deployment details for applications
Updating icons in an XNA Game Studio 4.0 Windows Phone game project
The default project templates for both Silverlight for Windows Phone and XNA Game Studio 4.0 Windows Phone projects in the Windows Phone Developer Tools use the settings for applications, not games. When you are ready to configure your XNA Game Studio 4.0 project as a game and update the icons, there are a couple of options. What I typically do is the following:
Alternatively, you can create a 173x173 .png file and overwrite the default GameThumbnail.png in your project. However, if you do that, you also have to remember to overwrite Background.png in your project as well. For a Windows Phone game, there isn’t any real reason to need 2 different icons because Games Hub and the start menu both use the same icon size.
How to test a game’s application icon in the emulator
The Windows Phone emulator does not have the Games Hub in it, so you cannot directly test how your application icon will look when it is displayed in Games Hub. However, the icon size in Games Hub matches the icon size when an application is pinned to the start menu. That means that you can use steps like the following to test the appearance of your game’s application icon in the emulator:
There are a few follow-up questions that folks usually ask when I explain the above information to them:
At the end of last week, the XNA Game Studio team released the XNA Game Studio 4.0 Japanese language pack. I wanted to provide some more information about this language pack and some download links to help you get started. My colleague Yuichi Ito has also posted an introduction to the XNA Game Studio 4.0 Japanese language pack in Japanese on his blog at http://blogs.msdn.com/b/ito/archive/2010/10/21/xna-game-studio-4-0-language-pack-released.aspx.
XNA Game Studio 4.0 Japanese language pack links
Here are some links to help you get started if you want to use the XNA Game Studio 4.0 Japanese language pack:
How to install the XNA Game Studio 4.0 Japanese language pack
You must first install XNA Game Studio 4.0 before installing the Japanese language pack. You can install XNA Game Studio 4.0 by using one of the following installers:
What is included in the XNA Game Studio 4.0 Japanese language pack
The XNA Game Studio 4.0 Japanese language pack provides localized versions of the following XNA Game Studio 4.0 components:
As announced earlier this week in this post on the Windows Phone Developer Blog, the Windows Phone Developer Tools October 2010 Update is now available for download. This update is a patch, so you must install the Windows Phone Developer Tools before you will be able to install the update.
This update includes the following components:
Here are some links to help you get started with the Windows Phone Developer Tools October 2010 Update:
My colleague Michael Klucher posted an item on his blog earlier this week that I wanted to link to in order to hopefully help raise visibility for it. In his post at http://klucher.com/blog/trials-and-tribulations/, he describes a performance issue to be aware of when developing Windows Phone games using XNA Game Studio 4.0 and the Windows Phone Developer Tools.
Here is a quick summary of the key points in his post:
Note - there is now a simpler set of steps to create a game with a localized title, and I have written a newer blog post with updated steps. Please refer to http://blogs.msdn.com/b/astebner/archive/2010/12/10/10103522.aspx for more details.
Recently, a user posted a question on the XNA forums asking how to localize the name of their Windows Phone game. They were attempting to follow the How to: Localize an Application Title for Windows Phone tutorial in the Windows Phone documentation, but were running into some issues. That tutorial contains instructions for localizing the title of a Silverlight application, but the steps are a bit different for XNA games. I also found some of the steps to be vague and/or confusing while I tried to work through them on my own.
I’ve created an updated set of steps that can be used to localize the name of a Windows Phone game created with XNA Game Studio 4.0. I also uploaded a sample solution that implements these steps.
The steps below and the sample solution that I have created both require that you use Visual Studio 2010 Professional, Premium or Ultimate because the steps require a version of Visual Studio that supports creating a solution that contains both C++ and C# projects. The VS 2010 Express Editions do not support this.
Step 0 – Create a Windows Phone game project
Step 1 – Create a language-neutral native resource DLL
Note - the name of the native resource DLL is important in this scenario. It must be named AppResLib.dll, and the localized versions must be named AppResLib.dll.*.mui. If they are named differently, your game will be rejected by the Windows Phone Marketplace certification process.
Step 2 – Create an English (US) native resource DLL
copy "$(OutputPath)$(ProjectName).dll" "$(OutputPath)\AppResLib.dll.0409.mui"
Step 3 – Create native resource DLLs for other supported languages
Step 4 – Add native resource DLLs to your Windows Phone game project
Step 5 – Make your Windows Phone game project dependent on the native resource DLL projects
Step 6 – Update your Windows Phone game to load title strings from the resource DLLs
Update the application title by doing the following:
Update the tile title by doing the following:
The tile title is the name that is displayed if you click and hold on your application/game in the Windows Phone OS and choose to pin it to the start menu. There is some additional information about these properties and how to configure them in XNA Game Studio games in this documentation topic. Depending on the scenarios you want to support for your game, it may not be necessary to create separate strings for your application title and tile title. If you plan to use the same string for both, you do not need to create separate entries in the string table in each of your native resource DLLs in the instructions above.
Step 7 – Rebuild your Windows Phone game solution
Rebuild the solution that contains your Windows Phone Game project and your resource DLL projects. When doing so, make sure that the Windows Phone Game project is set as the startup project (as opposed to one of the resource DLL projects or your content project).
<update date="10/15/2010"> I found out today that the ingestion process requires that the resource DLL be named AppResLib.dll, so I've updated the steps in this post to reflect that, and I've posted an updated sample solution. </update>
<update date="1/18/2011"> Added a stronger warning about the naming of the DLL needing to exactly match what is listed in the documentation. </update>
There was an item posted on the XNA Game Studio team blog today that I wanted to link to in order to raise visibility because it helps answer some questions that have been asked frequently since XNA Game Studio 4.0 shipped last month. The post is located at http://blogs.msdn.com/b/xna/archive/2010/10/12/xna-game-studio-4-0-submissions-for-xbox-live-indie-games.aspx, and it provides more detail about the timeframe when the Xbox LIVE Indie Games submission pipeline will start accepting games created with XNA Game Studio 4.0 and when it will stop accepting games created with XNA Game Studio 3.1.
Here is a summary of the information in that post:
If you are just getting started with an Xbox 360 game using XNA Game Studio or have a game in progress that you do not plan to be ready to publish on Xbox LIVE Indie Games by the end of this year, then we recommend starting with XNA Game Studio 4.0 or porting your game to XNA Game Studio 4.0 to prepare for the above changes to the Xbox LIVE Indie Game pipeline.
As always, stay tuned to the XNA Game Studio team blog and the App Hub site for future announcements about the final release date for XNA Game Studio Connect for XNA Game Studio 4.0 and the opening of the Xbox LIVE Indie Games pipeline for XNA Game Studio 4.0 games.
At the end of last week, the French, German, Italian and Spanish versions of the Windows Phone Developer Tools were released. These versions of WPDT contain localized versions of the developer tools (including XNA Game Studio 4.0 components) and the Windows Phone Emulator. You can only install one language of the Windows Phone Developer Tools on a computer at a time, so if you already have the English version installed and want to use one of these localized versions, you will need to uninstall the English version first.
Here are links that you can use to download and get started using each language version of the Windows Phone Developer Tools.
French Windows Phone Developer Tools links
German Windows Phone Developer Tools links
Italian Windows Phone Developer Tools links
Spanish Windows Phone Developer Tools links