2013-03-10

HOWTO: make MS VS 2005 work with WPF etc.

WPF ("Windows Presentation Fundation", just another MS Windows GUI API from .NET 3.0 "WinFX", this time XML-based) is fully supported in Microsoft Visual Studio 2008 and newer.
If you use VS 2005, you'll not find an option to create a WPF project from the New Project dialog (WPF was released as part of .NET Framework 3.0, while VS 2005 is for .NET 2.0).

Here are the required steps to get an ability to build WPF projects with VS 2005.
  1. Download .NET Framework 3.5 SP1 (if you don't have an up-to-date .NET 3.x version installed yet).
  2. Download a small add-on for VS 2005:
    Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP
    Mirror: CNET | Download.com
    Note: MS has released that package as a CTP ("Community Technology Preview", MS' term for some kind of beta / preview SW releases); it's unsupported, so upgrade to VS 2008 or later is recommended.
  3. Install the downloaded MSI package.
    If the installer exits with an error (regarding the bad / already installed / newer .NET version), you should start it manually (i. e., from MS Windows Command Prompt, you know: <Win>+<R>, cmd, <Enter>) with a specific option:
    > cd P:\ath\To\Installer\Folder
    > msiexec /i vsextwfx.msi WRC_INSTALLED_OVERRIDE=1
    It allows to ignore that error and continue the installation process.
  4. After that, a new option titled Windows Application (WPF) should appear as part of (new!) .NET Framework 3.0 subcategory for C# language in the New Project dialog of the Studio.
    Enjoy!

See also:
  1. Visual Studio 2005 extensions for .NET Framework 3.0 (WF)
  2. Wikipedia: WCF / WPF / WF | .NET Framework

No comments:

Post a Comment