Sometimes I write about code & tech in the AEC industry.
Co-founder of Speckle.
Formerly Arup, Foster+Partners, WeWork, CASE Inc.

Switch existing Visual Studio project type from WinForms to WPF

It may happen that you are working on a Visual Studio project that was initially set up for Windows Forms, and now you want to insert some cool WPF controls, but these won’t show up when clicking the “Add…” button.

A simple way to do so is to change the ProjectTypeGuids in your .csproj file.

Open the .csproj file in a text editor, and add the following line in the first PropertyGroup element:


As shown here:


Now when you click the Add button you will have both WPF and WinForm controls to choose from:


N.B. The Project Type GUIDS I’m usign refer to Visual Studio Professional 2013, if you are using another version they might differ. In this case just create a new blank WPF project and snoop its .csproj file to see the correct GUIDS to use.

comments powered by Disqus