Home > .NET, 2010, Visual Studio > How to Change Target Framework from Client Profile to .NET 4.0

How to Change Target Framework from Client Profile to .NET 4.0

Update Default Visual Studio Projects Target Framework


  • Go to %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache
  • Browse into the folders you are interested in for example, \CSharp\Windows\1033\WPFApplication.zip\
  • Open the project file in Notepad, example WPFApplication.csproj
  • Find the following element <TargetFrameworkProfile>Client</TargetFrameworkProfile>
  • Delete the value of the TargetFrameworkProfile element (i.e. Client) => <TargetFrameworkProfile></TargetFrameworkProfile>
  • Save the file and close Notepad
  • Browse to %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\
  • Browse into the folder of interest (e.g C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Windows\1033)
  • Extract the zip file for the project of interest (e.g WPFApplication.zip) NOTE: UAC may give you problems here, you may want to disable UAC or copy the zip file into your desktop
  • Replace the project file in the extracted folder with the one you edited in the ProjectTemplatesCache folder
  • Zip the file and copy it to the same location where it was
  • Open visual studio
  • Create new project based on the template you modified…Bingo 🙂

If you don’t want to modify the default templates, you need to create new project template

  • Create new project (e.g. WPF Application)
  • Go to project properties
  • Change target framework to .NET 4.0
  • Save the project
  • Click File –> Export Template, if you don’t see it make sure you open one of the files (e.g a .cs file)
  • In the Export Template Wizard
    • Choose project template
    • Choose the project you created
    • Click Next
    • Name the new template (e.g. WPF Application without Client Profile)
    • Take a note of the folder where the template is exported
    • Click finish
    • Copy the exported template to C:\Users\Owner\Documents\Visual Studio 2010\Templates\ProjectTemplates\ if you want the template to be available for you only. If you wanted to be available to all users on the computer, the *.zip file need to be copied to %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates
    • Open Visual Studio, the exported template may not be visible under the same project type (e.g. Visual C#—> Windows), it will be available under the language node (e.g. Visual C#)
  1. Issamo
    February 6, 2011 at 2:19 pm

    Nice blog Ahmad…Bingoo..:D

    • Lajak Technologies Inc
      February 6, 2011 at 5:37 pm

      Thanks bro 😉

  2. February 7, 2011 at 11:44 am

    Very cool info!!!!!

    • Lajak Technologies Inc
      February 7, 2011 at 11:58 am

      Thanks Peter 🙂

  3. observer
    November 18, 2011 at 12:33 pm

    This works, but only on the surface. Check your app.config file —> still running as client profile.

    • Lajak Technologies Inc
      November 20, 2011 at 4:15 pm

      Which project template did you use?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: