Home > Articles > Programming

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

Installing Visual C# 2008 Express

To get started, you must have the software installed. Let’s start by installing Visual C# 2008 Express.

XNA requires C# due to how the Content Pipeline is used. Some people have successfully created demos using other languages, such as VB.NET and even F#. However, this is not currently supported by Microsoft 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 provide detailed steps to make sure 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 a Visual Studio 2008 SKU installed.

To install Visual C# 2008 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://www.microsoft.com/express/download/ and clicking the Visual C# 2008 Express Edition Download link to download and run 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 Game Studio.
    Figure 1.2

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

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

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

  8. Click Next to continue.
  9. Now you are looking at the Installation Progress screen, where you can monitor the progress of the installation.
  10. On the Setup Complete screen, you can see the Microsoft Update link. Click it to get any of the latest service packs for Visual C# Express.
  11. Click Exit to complete the installation.

You have now successfully installed the first piece of the pie to start creating excellent games with XNA! Before we continue to the next piece of software, you 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, you should see the Start Page, 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 your 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 you 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 WindowsFormsApplication1 because you will just be discarding this project when we are done.
  4. Click OK to create the application.
  5. At this point a new project should have been created, and you should be looking at a blank Windows Form called Form1.
  6. Press Ctrl+F5 or click Start Without Debugging on the Debug menu.

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

Figure 1.6

Figure 1.6 A C# Windows Form application after the default template has been compiled and run.

  • + Share This
  • 🔖 Save To Your Account