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

Advertisements

One thought on “Switching Project Type Between Windows Runtime Component and (.NET) Class Library

  1. […] Switching Project Type Between Windows Runtime Component and (.NET) Class Library (Filip Skakun) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: