Windows 8 is Windows re-imagined. This blog is a resource for you to learn how to develop applications for Windows 8 using Visual Studio. Over the next weeks and months I will post about how to use the new platform to build Windows store apps. You’ll see how to use the platform design tenets, the programming language choices and how Windows 8 provides integration points between the operating system and apps.
Before you can go deep into the details, you’ll need the tools, so the first step will be in acquiring and installing the free Visual Studio tools for Windows 8 Development. You’ll need the Windows 8 OS to run them on, of course, so your starting point for this will be the Windows Dev Center at: http://msdn.microsoft.com/en-US/windows/default.aspx
From the big friendly yellow banner welcoming you, click the ‘Start downloading!’ button.
This will take you to this site:
From here you can download Windows 8 if you are an MSDN subscriber, or, you can download a free evaluation version if you are not. Alternatively, you can get a low-cost upgrade to Windows 8 using the upgrade program, but be sure to be fast, because the discount expires soon! http://www.microsoftstore.com/store/msstore/html/pbpage.Windows_8_Pro?icid=homepage_rot1_Win8upgrade_9days
From the msdn site (here), you can download the free Visual Studio Express for Windows 8 suite. On the right of the page you’ll see a section that reads ‘Download the tools and SDK’. If you are using English, you can click the ‘Download now’ button, or, for other languages, follow the ‘Get details and additional languages’ link.
Pressing the ‘Download now’ button will launch the Visual Studio Express 2012 for Windows 8 (with Blend) installer. It’s a bit of a mouthful, but it’s a terrific tool!
If you agree to the License terms and conditions, and want to install the tools, check the box, and you’ll see the install button appear. Select this, and the installation will begin. The installer downloads the components it needs and installs them for you. It’ll take a few minutes, depending on your internet connection speed.
When it’s all done, you’ll be given a big friendly launch button, which will launch Visual Studio 2012 for you. The free product will expire in 30 days, but you can register to continue beyond this. Registration is free, so if you want to use Visual Studio beyond the 30 days, select the ‘Register Online’ link, and fill out all your details. When you’re done, you’ll get a product key that you can paste into the Product Key: box. Do this, and you’ll be good to go with a fully operational Visual Studio 2012 Express for building Windows 8 applications.
When you launch Visual Studio Express 2012 for the first time it will ask you for a Developer License. This is used to sign your Windows Store Apps, and like Visual Studio Express 2012, is also free. You’ll just need a Microsoft account (such as a Hotmail address) in order to get one. If you have one, just sign in at the dialog. If not, you can sign up for one by selecting the link in the developer license dialog.
Your license is valid for 30 days, and you can continually extend it for another 30 days after it expires. So you’re now good to go. You’ll see Visual Studio on your Windows 8 Start Screen, as an icon called VS Express for Windows 8. Click it to launch.
You’re now ready to build your first Windows 8 App!
Let’s create a simple app to get started with using the tools. Launch VS Express for Windows 8, and you’ll see the workbench. At the top of the screen, select the ‘File’ menu, and pick the ‘New Project…’ entry. A new dialog will come up giving you a number of options for your app. Look at this dialog carefully.
Select ‘Visual C#’, and you’ll see the different template options that are available for this language:
Select the Grid App (XAML) template as shown, and give it the name ‘GridApp1’. Press OK, and Visual Studio will create the code for this app for you.
Visual Studio provides a Windows 8 simulator that you can use to simulate a Windows 8 tablet with full capabilities such as gyroscopes and location awareness. This is useful if your development machine doesn’t have these capabilities, so you can still build an app that uses them. To try your GridApp1 in the simulator, take a look for this button in the toolbar at the top center of your screen:
To the right of the words ‘Local Machine’ you’ll see a little drop down arrow. Click on it, and you’ll see a menu appear. One of the options on this menu is ‘Simulator’. Select that, and then press the green arrow (or ‘play’) button. Visual Studio will then build your application and launch it in the simulator. It should look something like this:
You can then use this to simulate table functionality to test your app! Of course you don’t need the simulator. If you had chosen to, you could also run the app on your development machine too! But remember, if you want to test capabilities that may not be present on your dev machine (multi touch, location awareness etc.), then the simulator is available.
And that’s it! You’re now up and running with Windows 8 developer tools. In future articles we’ll look at how you can build Windows Store apps using these tools, and, of course, how you can deploy them to the store!