How to use the same library for Silverlight and CLR

I have a library with custom domain logic. Some of them hit hard and depend on the main runtime outside the Silverlight runtime.

Is it possible to compile the same code for two different time periods and indicate different tastes for different consumers? how

+3
source share
4 answers

There are several ways to achieve what you want.

  • You cannot reference the full .net assembly assemblies in silverlight, but you can do it the other way around so that you can encode SL and then reference SL projects in projects compiled against the full .Net.

  • , Prism v2 Project Linker addin, , Visual Studio , .

+3

, , CLR, Silverlight. , , CLR Silverlight.

;)

[ : , ( , cs), - )

+2

Have you considered using the Workflow Foundation for your task?

PS The question is VERY broad. Could you provide a sample so that we have something to work with?

+1
source

Add two class library projects (SLLib, CLRLib) to your solution. Then add all your .cs files to both solutions.

0
source

Source: https://habr.com/ru/post/1707828/


All Articles