Posts

Showing posts from September, 2011

Referencing Silverlight assemblies from non-SL projects

Image
One of the best things about Silverlight is that represents a set of portable functionality that you can expect to run almost anywhere. Its similarity – although reduced – with WPF results in an amazing way to develop rich UIs and logic in Browser-side apps. And then results normal to want to reuse Silverlight code from our own .NET applications. Reusing code from Silverlight assemblies is possible; the referencing process works well because Silverlight is a subset of .NET Framework, so that “by logic” should just work. Of course this is not all happiness, there are lot of limitations, but it will work as long as you keep yourself into the borders of certain assemblies like Mscorlib , System ,System.Core ,System.ComponentModel.Composition and Microsoft.VisualBasic , playing with others might give you mixed results. Now the trick. You SHOULD NOT add the reference to the Silverlight PROJECT. You MUST add the reference to the Silverlight ASSEMBLY. So let’s assume you have a scenario with