Home > Articles > Programming > Games

  • Print
  • + Share This
This chapter is from the book

Installing Visual C# Express

To get started, we must have the software installed. Let's start by installing Visual C# Express. Visual C# Express is the IDE that is required to run XNA Game Studio Express. XNA requires C# due to how the Content Pipeline is used. There are some people who have successfully created demos using other languages such as VB.NET and even F#. However, this is not supported by Microsoft currently and won't be discussed in this book. This book assumes you have a good understanding of C#. If you know C++, Java, or VB.NET, you should be able to pick up C# pretty quickly.

I am going to be detailed in the steps to make sure that anyone who has not worked with Visual C# Express will be able to get it installed with no issues. Feel free to skip this section if you already have Visual C# Express installed.

To install Visual C# Express, follow these steps:

  1. You will need to be connected to the Internet to install the application. The application can be downloaded by browsing to http://msdn.microsoft.com/vstudio/express/downloads/ and clicking the Visual C# Express Go button to download the vcssetup.exe setup program.
  2. Optional. On the Welcome to Setup screen select the check box to send data about your setup experience to Microsoft. This way if something goes awry, Microsoft can get the data and try to make the experience better the next time around. This screen is shown in Figure 1.1.
    Figure 1.1

    Figure 1.1 Select the check box if you want the system to provide feedback to Microsoft about your installation experience.

  3. Click Next to continue.
  4. The next screen is the End-User License Agreement. If you accept the terms, select the check box and click Next.
  5. The following screen, shown in Figure 1.2, has two installation options you can check. Neither of these options is required to utilize XNA.
    Figure 1.2

    Figure 1.2 Neither of these options is required to utilize XNA.

  6. Click Next to continue.
  7. The next screen, shown in Figure 1.3, asks where we would like to install Visual C# Express. It is going to install other required applications including Microsoft .NET Framework 2.0. This is required, as C# runs on the .NET Framework. You will also notice it requires more than 300MB of space.
    Figure 1.3

    Figure 1.3 Specify which directory you want Visual C# Express to be installed in.

  8. Click Next to continue.
  9. Now we are looking at the Installation Progress screen where we will be able to monitor the progress of the installation.
  10. Finally, on the Setup Complete screen we can see the Windows Update link we can click on to get any of the latest service packs for Visual C# Express.
  11. Click Exit to complete the installation.

    We have successfully installed the first piece of the pie to start creating excellent games with XNA! Before we continue to the next piece of software, we need to open up Visual C# Express. It might take a couple of minutes to launch the first time the application is loaded. Once the Visual C# Express is loaded we should see the Start Page as shown in Figure 1.4.

    Figure 1.4

    Figure 1.4 This is the Start Page inside of Visual C# Express.

The following procedure is optional, but it does ensure that everything is working correctly on our machine.

  1. In the Recent Projects section, find Create Project and click the link. You can also create a new project under the File menu.
  2. Visual C# Express installed several default templates that we can choose from. Select the Windows Application template as displayed in Figure 1.5.
    Figure 1.5

    Figure 1.5 The New Project dialog box allows you to choose from the default templates to create an application.

  3. You can leave the name set to WindowsApplication1 as we will just be discarding this project when we are done.
  4. Click OK to create the application.

    At this point a new project should have been created and we should be looking at a blank Windows Form called Form1.

  5. Press Ctrl+F5 or click Start Without Debugging on the Debug menu.

    If everything compiled correctly, the form we just saw in design mode should actually be running. Granted, it doesn't do anything, but it does prove that we can compile and run C# through Visual C# Express. The end result can be seen in Figure 1.6. Let's close down the application we just created as well as Visual C# Express. Feel free to discard the application.

    Figure 1.6

    Figure 1.6 This is a C# Windows Form application after compiling and running the default template.

  • + Share This
  • 🔖 Save To Your Account