Can't find ResourceDictionary in Add New Item Window

Cuero picture Cuero · Sep 24, 2012 · Viewed 9.8k times · Source

When I create a new WPF project I can find ResourceDictionary in Add New Item Window. But I've another Project I can't find that and I don't know why. Only UserControl but no ResourceDictionary

UPDATE: The project was for .net 3.5 originally, but now it also has a version for .net 4.0. It means there're two .sln files (one for 3.5 and the other for 4.0) both for the same project.

Answer

MatrixManAtYrService picture MatrixManAtYrService · Dec 30, 2014

Add the following line to Project.csproj

    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

It should be a child of the <PropertyGroup> tag, like so:

    <Project>
      <PropertyGroup>
        ....
        <ProjectTypeGuids>{guids};{go};{here}</ProjectTypeGuids>
        ...
      </PropertyGroup>
    ...
    </Project>

This post does a good job of explaining why this works.