Monthly Archives: March 2013

Switching Project Type Between Windows Runtime Component and (.NET) Class Library

There are times when you might want to switch the type of your library between a Windows Runtime Component and (.NET) Class Library. Why would you do that? There are slight differences between these – a WinRT Component can be used by other assemblies written in any language supported by WinRT – your APIs will be projected to these other languages. A Class Library can only (easily) be used by .NET assemblies, but allows you to have class inheritance. Depending on the realization or change of your requirements then you might decide that you need to change the type of the library you have already created, but how do you do that? Easily. Assuming your code is compliant with the above mentioned limitations you just need to change the value of one XML element in your csproj file between <OutputType>winmdobj</OutputType> and <OutputType>Library</OutputType>.

*EDIT

Silly me, how could I have overlooked it? The project properties panel has an option for switching between Class Library, WinRT Component and Windows Store App!

Switching project types between Class Library, Windows Runtime Component and Windows Store App in Visual Studio

Switching project types between Class Library, Windows Runtime Component and Windows Store App in Visual Studio