This series is devoted to the design and development of my framework, FGF (Focused Games Framework), and aims to cover topics like async content management, WCF services, and many more. In this first article, I cover how to setup Visual Studio 2008 for coding the framework. It is important to understand that I will be using Visual Studio Team System 2008 and thus may have features that are not available in the Express edition. It is possible to get around many of these or ignore them completely, however, so not having Team System does not mean developing FGF is impossible.
The first step is to open up the IDE and create our solution. When starting a large solution such as the one for FGF, I find it useful to create a Blank Solution so that the solution’s name can be different than that of the first project. Again, this can be worked around in Express as well as other versions of the editor.

One of the requirements of the framework I am building (FGF) is cross platform support. For my XNA games this means support for not only Windows but also the Zune and the Xbox 360. For my Windows based projects I often find that X64 can be used (and in the case of IIS in 2008 R2, encouraged) so I also support X64 versions.
The problem is that when using an XNA project template to build a library for the simple fact that XNA projects can automatically synchronized (across platforms), Visual Studio blocks the creation of an X64 build target. Rather you are stuck with X86, Zune or Xbox 360.
The good news is that you can get around this! Open up the Windows project file (csproj) in a suitable text editor and copy the sections for both “Debug|x86″ and “Release|x86″ and paste them right after.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\Bin\x86\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <NoStdLib>true</NoStdLib> <UseVSHostingProcess>false</UseVSHostingProcess> <PlatformTarget>x86</PlatformTarget> <XnaCompressContent>false</XnaCompressContent> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\Bin\x86\Release\</OutputPath> <DefineConstants>TRACE;WINDOWS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <NoStdLib>true</NoStdLib> <UseVSHostingProcess>false</UseVSHostingProcess> <PlatformTarget>x86</PlatformTarget> <XnaCompressContent>true</XnaCompressContent> </PropertyGroup> |
Next you simply replace the instances of x86 with x64 and change anything else you need.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\Bin\x64\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <NoStdLib>true</NoStdLib> <UseVSHostingProcess>false</UseVSHostingProcess> <PlatformTarget>x64</PlatformTarget> <XnaCompressContent>false</XnaCompressContent> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\Bin\x64\Release\</OutputPath> <DefineConstants>TRACE;WINDOWS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <NoStdLib>true</NoStdLib> <UseVSHostingProcess>false</UseVSHostingProcess> <PlatformTarget>x64</PlatformTarget> <XnaCompressContent>true</XnaCompressContent> </PropertyGroup> |
One warning – this should only be used for projects that don’t require references to the XNA framework. At this time Microsoft has no support for x64 XNA references.
As Jason Zander shows on his blog, Visual Studio 2010 is looking gorgeous in its WPF kit. The added capabilities of the IDE and the power extensions now have will put this software above and beyond the rest for many years. If Microsoft still does one thing brilliantly, it is write great IDE software.