Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do universal windows assemblies work with a .net console app?

I am working on a Universal Windows assembly and cannot add a reference to it from a C# console application project in the same solution. The console app would be a simple test bed application for interactive use of the universal dll.

Do universal windows assemblies not work with straightup Console apps? When I try to add a reference to the universal project VS.NET shows a very uninformative "Cannot add reference to project" message.

like image 868
dkackman Avatar asked Aug 28 '15 22:08

dkackman


1 Answers

They don't. But if you want to share assemblies between different platforms you should move the logic to a new assembly and setup this one as PCL (portable class library) setting the platforms you want to support.

That's because Universal windows Apps doesn't share the same "binary" formats with classic .Net Framework Applications. They don't even share the same CLR.

like image 194
JuanK Avatar answered Oct 11 '22 12:10

JuanK