Search code examples
.netvisual-studio-2010xna-4.0

Unable to select Target framework for XNA 4.0 games


I have an XNA 4.0 project that I would like to be compiled with the .Net 4.0 Full profile, but it is set to Client profile by default. The Target framework combobox in the Application tab is grayed out.

I have uninstalled and reinstalled .Net 3.5, .Net 4.0 and Xna 4.0. What could be the problem? Our other development machines do not have this problem.

enter image description here


Solution

  • I found a workaround:

    In the .csproj file is an xml element called TargetFrameworkProfile which is set to Client. When I remove the word Client and thus empty the xml node, the project is built as a full .Net 4.0 assembly.

    You can even upgrade the project to .NET 4.5 or higher by changing the TargetFrameworkVersion element. We use this to be able to use the Kinect One camera in XNA games.

    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>