.NET Blog

Tony Cavaliere

 
My Favourite Albums
  And the Grappa wins.
E-mail me Send mail

Disclaimer

Hey unlike other bloggers I stand by what I say but just in case. The opinions expressed herein are my own except on Tuesday when the second card is not turned up otherwise it ain't worth squat.

© Copyright 2012

Does Silverlight force duplication of code? Part Two

In a previous post I mentioned that it is difficult to share code between the Silverlight client and server. The IDE does not allow a class library to be referenced from a Silverlight application. In addition, a Silverlight class library cannot be referenced from a non Silverlight project. This restriction makes sense since the Silverlight .NET Framework is a subset of the .NET Framework.

If you do need to share code then you can use the Visual Studio Add As Link feature where you add an existing item as a link, effectively using the same code. My recommendation is to create the code in a Silverlight class library and then add a regular class library and add the code from the Silverlight class library by using Add Existing Item - Add As Link.

Add as Link

Figure 1: Linking to an existing item.

 

Thanks to SLADAPTER for the response on Silverlight.net forums.

Guess the movie

What can you expect when you're on top? You know? It's like Napoleon. When he was the king, you know, people were just constantly trying to conquer him, you know, in the Roman Empire. So, it's history repeating itself all over again.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: Silverlight
Posted by CynotWhyNot on Thursday, September 25, 2008 4:15 AM
Permalink | Comments (2) | Post RSSRSS comment feed

Related posts

Comments

discount bags sale US

Thursday, May 27, 2010 2:35 PM

discount bags sale

I guess there is always an easier way ...

wholesale supplements supplier us

Tuesday, October 19, 2010 9:48 AM

wholesale supplements supplier

ngsoxugrcungjoqivt, http://www.physique-wholesale.com , oRTulHCWyuKzwLWFhaUc.