Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the project type from class library to WPF User control library

Tags:

wpf

prism

While setting up my Prism WPF solution I had added a project as Class library. Just realized I want it as a WPF user control library to add resource dictionaries and other WPF related stuff. Is there a way to convert my class library project to WPF user control library project? (Project properties just has the option to convert between Console, Class library, Windows app!)

like image 245
ioWint Avatar asked Jul 27 '11 20:07

ioWint


1 Answers

You need to add the following to your project file;

Under the <FileAlignment> element

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

You may also want to insure you've the following references added within the <ItemGroup> element;

  • <Reference Include="WindowsBase" />
  • <Reference Include="PresentationCore" />
  • <Reference Include="PresentationFramework" />
  • <Reference Include="System.Xaml" />
like image 73
obaylis Avatar answered Oct 26 '22 13:10

obaylis