Przemaas
Przemaas

Reputation: 851

Can I add winRT project reference to classic class library project?

VS gives me errors when I try to do it. Yet, it displays such projects as available to reference. Is it possible to add winRT project reference to the classic class library project somehow?

If not, how to bridge both worlds, so common logic can be stored in one place?

Upvotes: 0

Views: 740

Answers (2)

toddus
toddus

Reputation: 11

VS2012 adds a "Portable Class Library" project type that allows you to select multiple targets, including the ability to target WinRT and full .Net 4.5 from one assembly.

See http://msdn.microsoft.com/en-us/library/gg597391.aspx.

Upvotes: 1

Adam Wilson
Adam Wilson

Reputation: 386

The short answer is yes. The long answer is that it's not supported and comes with some caveats that you need to understand.

See my answer here: Using Custom Windows Runtime Components in Non-Metro Applications

Upvotes: 1

Related Questions