Step 1: Install MS Visual Studio 2010
3. VS10-KB2486994-x86(/x64).exe - MSVS 2010 update
Another Note: These last two tend to hang for rediculous amounts of time. You can Google the problem, but waiting seems to be the only current solution. When I finally got it to work, it took
over an hour to finish vm_web.exe, and about 45min for the 'Hotfix' to finish. They both would
get about 80% done with the install, then just hang for about 30 minutes before finishing up. It
may have something to do with the fact that my setup is consists of Windows 7 Pro x86 installed
via BootCamp on a late 2007 MacBook Pro... but a lot of people have this problem, so maybe not.
Step 3: Creating your first WP7 app!
(This is where we check to see if you have properly configured MSVS 2010)
Before we dive in you need to consider how you will be debugging / running your apps. If you have a WP7 phone (device), then you will need to download, install and run the Zune software bundle. If you don't know what Zune is, think MS's answer to iTunes, and you'd be close. It's been around for a while, but if you are a Mac-tard (like me), then you may not have really noticed it, yet. In order
to connect your device to your computer, you need Zune. So chances are that if you have a compatible device, you already have Zune installed. If you want to debug on a device, start-up Zune and connect your Windows Phone to your computer via USB. You may need to log in to
Zune as well. If you don't have a device, or you don't want to use yours to dev with, then you don't really need Zune. Just launch MSVS 2010 Pro.
Now go ahead and select File > New > Project. Then in the pop-up, select a Windows Phone Game(4.0) template. It should be the default, but in case it isn't you can find it in the left hand
panel under Visual C# > XNA Game Studio 4.0. Here you can change the name of your game to whatever you like, but for the purposes of these tutorials, we'll name it 'TacticsRoguer'.
Ensure the 'Create directory for solution' box is checked, then click 'OK'.
If you've connected your device and have Zune running skip this next part.
Otherwise, change the XNA Gama Studio Deployment Device to 'Emulator' as seen here (screenshot00ba&c).
Now we're ready to debug and run this app! Just press the green right arrow button to 'debug and run'. If you have a device connected, you should see (I DON'T KNOW YET) If you are using the Emulator, then you should see a virtual phone pop-up. It will say 'Windows Phone Emulator is doing a complete OS boot' followed by the 'Windows Phone' logo and some scroll dots. Next you'll see
the main phone desktop with the Internet Explorer Icon and an arrow pointing right. DON'T DO ANYTHING! Just wait. The first time you launch and app for a session takes forever. Eventually the emulator will execute the app, turning the emulator screen to the 'Cornflower Blue'
color. This is the XNA equivalent of a 'Hello World' program.
COMMON ERROR:
"Zune software is not launched. Retry after making sure that Zune software is launched."
FIX: If you're trying to use your Windows Phone for development, make sure you have Zune running, you're logged in, you have your phone connected, and Zune see's your phone. If you're trying to dev with the emulator, you must select 'Windows Phone 7 Emulator' in the 'Deployment Device Selector'.
COMMON ERROR:
"Out of Memory"
FIX: If you get this one, the only fix I have found is to shrink the Emulator.
CONGRATULATIONS! You've just deployed your first Windows Phone 7 app! In order to keep the emulator running, you'll need to click back inside Visual Studio, then press Shift+F5 to cancel the debugging. Pressing F5 or the green arrow will re-debug the app, which you can see happens _much_ faster than it did the first time.
That's it for this tutorial! You should have:
Installed MSVS 2010,
Installed the Windows Phone 7 Dev tools,
Patched both of those,
Created your first WP7 project,
and launched the default WP7 app on either the Emulator or your WP7 device (or even both!)
In the next tutorial we will create an event handler to escape from the app without needing to 'shift-F5' it in MSVS.
See you then!
-H
(Assuming you have no versions of MS Visual Studio installed. If you have MSVS 2008 installed, back-up your projects and uninstall XNA 3.x, then uninstall MSVS 2008.)
In order to develop for Windows Phone 7, you're going to need at least Visual Studio 2010 Express (which comes with the Windows Phone 7 development tools). I'm a PhD student at a school
subscribing to the MSDN e-academy, so I have access to MSVS 2010 Pro for free. So I will be doing things that may not be possible with just the Express install that comes with the
Windows Phone 7 dev kit (refactoring methods for example).
You can go here to see if your school is part of MSDN:
http://msdn.microsoft.com/en-us/academic/dd861349.
And you can get the Windows Phone 7 development tools here:
http://msdn.microsoft.com/en-us/library/ff402530(v=vs.92).aspx.
You can go here to see if your school is part of MSDN:
http://msdn.microsoft.com/en-us/academic/dd861349.
And you can get the Windows Phone 7 development tools here:
http://msdn.microsoft.com/en-us/library/ff402530(v=vs.92).aspx.
Before installing the WP7 dev kit, REMOVE XNA GAME STUDIO 4.0! The WP7 installer will hang for days (literally!) if you have already installed both MSVS 2010 and XNA 4. So go uninstall XNA 4, and come back here when you're done.
Step 2: Install Windows Phone 7 development tools
(Assuming you have MSVS 2010 Pro installed, and NOT XNA 4.0) The WP7 dev tools come in three parts, and you can get them from the second link above: (THESE SHOULD BE INSTALLED IN THIS ORDER!!! But first check to see if MSVS 2010 Hotfix KB2486994 has been installed by going to
Control Panel > Programs > Programs and Features > View Installed Updates (See sceenshot00a).
You should see 'Hotfix KB2486994' under Microsoft Visual Studio 2010 Professional when it has been installed.
1. vm_web.exe - The installer for MSVS 2010 Express and all of the WP7 framework stuff
2. WindowsPhoneDeveloperResources_en-US_Patch1.msp
3. VS10-KB2486994-x86(/x64).exe - MSVS 2010 update
Another Note: These last two tend to hang for rediculous amounts of time. You can Google the
over an hour to finish vm_web.exe, and about 45min for the 'Hotfix' to finish. They both would
get about 80% done with the install, then just hang for about 30 minutes before finishing up. It
may have something to do with the fact that my setup is consists of Windows 7 Pro x86 installed
via BootCamp on a late 2007 MacBook Pro... but a lot of people have this problem, so maybe not.
(This is where we check to see if you have properly configured MSVS 2010)
Before we dive in you need to consider how you will be debugging / running your apps. If you have a WP7 phone (device), then you will need to download, install and run the Zune software bundle. If you don't know what Zune is, think MS's answer to iTunes, and you'd be close. It's been around for a while, but if you are a Mac-tard (like me), then you may not have really noticed it, yet. In order
to connect your device to your computer, you need Zune. So chances are that if you have a compatible device, you already have Zune installed. If you want to debug on a device, start-up Zune and connect your Windows Phone to your computer via USB. You may need to log in to
Zune as well. If you don't have a device, or you don't want to use yours to dev with, then you don't really need Zune. Just launch MSVS 2010 Pro.
Now go ahead and select File > New > Project. Then in the pop-up, select a Windows Phone Game(4.0) template. It should be the default, but in case it isn't you can find it in the left hand
panel under Visual C# > XNA Game Studio 4.0. Here you can change the name of your game to whatever you like, but for the purposes of these tutorials, we'll name it 'TacticsRoguer'.
Ensure the 'Create directory for solution' box is checked, then click 'OK'.
If you've connected your device and have Zune running skip this next part.
Now we're ready to debug and run this app! Just press the green right arrow button to 'debug and run'. If you have a device connected, you should see (I DON'T KNOW YET) If you are using the Emulator, then you should see a virtual phone pop-up. It will say 'Windows Phone Emulator is doing a complete OS boot' followed by the 'Windows Phone' logo and some scroll dots. Next you'll see
the main phone desktop with the Internet Explorer Icon and an arrow pointing right. DON'T DO ANYTHING! Just wait. The first time you launch and app for a session takes forever. Eventually the emulator will execute the app, turning the emulator screen to the 'Cornflower Blue'
color. This is the XNA equivalent of a 'Hello World' program.
COMMON ERROR:
"Zune software is not launched. Retry after making sure that Zune software is launched."
COMMON ERROR:
"Out of Memory"
That's it for this tutorial! You should have:
Installed MSVS 2010,
Installed the Windows Phone 7 Dev tools,
Patched both of those,
Created your first WP7 project,
and launched the default WP7 app on either the Emulator or your WP7 device (or even both!)
In the next tutorial we will create an event handler to escape from the app without needing to 'shift-F5' it in MSVS.
-H
No comments:
Post a Comment