There is a legacy application developed by WPF. There are a lot of projects in the application, including several UI projects. The problem is that in one of these UI projects in the context menu there is no Add / Resource Dictionary option ... I compare two "neighboring" projects - in one there is this option, in the other there is not, although the first one is the same and the links to the libraries are also they are the same.

By the way, in the same project in the context menu the Design in Blend option is missing ...

I work with Visaul Studio 2015 Enterprise

    1 answer 1

    Apparently, you did not create a project as a WPF project. The difference is what ProjectTypeGuid values ​​have been added to the project.

    To fix it, close Visual Studio, open the project file ( .csproj ) in a text editor, find the ProjectTypeGuids tag, and make sure that it looks like this:

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

    In addition, you need links to PresentationCore , PresentationFramework and WindowsBase , but you seem to have them already.

    • I have the same problem in the old WPF project where there are created dictionaries. And I cannot add a new one, I have to copy the finished one from the same project. Most likely it's in the studio update. - vitidev
    • @vitidev: Doesn't the recipe from the answer help? - VladD
    • Well, in exe applications there is such a field, but for dll what to do? - vitidev
    • @vitidev: Add a field if you don’t have one? - VladD
    • It seems to help. However, the logic of the studio developers is rather its absence - vitidev