Why can't I add certain file types to VS2010 projects?

前端 未结 3 1411
被撕碎了的回忆
被撕碎了的回忆 2020-12-28 14:51

I\'m trying to add a WPF ResourceDictionary to a C# project that was created a while ago. The project was not originally a WPF project, but now I need to include some WPF re

3条回答
  •  独厮守ぢ
    2020-12-28 15:47

    Try creating a blank WPF project and then diff the .csproj files (they're just plain XML) for that and your project to see what differences there are - apart from the file lists and the odd compiler setting, you may well find a GUID or other entry that identifies the type of the project, which you will be able to copy/paste across to "upgrade" your project (after taking a backup of your existing project file of course!)

    Alternatively, you can copy and paste the file/folder XML (carefully) between the csproj files to quickly "rebuild the entire project from scratch", so this needn't be something to be afraid of doing.

提交回复
热议问题