Dmitry Shechtman's Blog

December 15, 2009

Turn your project into WPF User Control Library in 10 seconds

Filed under: Tips — Tags: , , , , — Dmitry Shechtman @ 08:29

I recently had to add a WPF resource dictionary to a project that was previously created as a plain Control Library. I learned that:

  1. all the WPF stuff (barring WPF User Control) is hidden in Add New Item menus/dialogs,
  2. no fine-tuning of project types is provided and
  3. TFS doesn’t make recreating a project an easy task,

so I created a new WPF User Control Library project and compared between the two.

Now, if you need to add WPF capabilities to your Control Library, just follow these simple instructions:

  1. Open the .csproj file in your favorite text editor (no, VS won’t do :twisted:)
  2. Under the first element add:
        <ProjectTypeGuid>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  3. If (VS.version >= 2010) add:
        <TargetFrameworkProfile>Client&amp</TargetFrameworkProfile>
  4. Save changes.
  5. Reload in VS.

Hey VS team, great obfuscation job! 😕

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.