For outstanding
technology
results...

Sharing Class Libraries between platforms

From the mouth of Microsoft: "Portable Library Tools is a new Visual Studio add-in from Microsoft that enables you to create C# and Visual Basic libraries that run on a variety of .NET-based platforms without recompilation."

What does that mean? Well, "No more complicated build scripts or #defines, and stop copying and pasting code; portable libraries enable you to easily share code between apps that target different platforms".

Very nice. I can see a few uses already where we share Transport projects between a Silverlight client and a Windows IIS service bank end. It would be a very good idea in the future for just about any of our class library projects in case of the "Oh no actually I'd like Silverlight in the cloud" switch overs.

Link to download here.

And more information here.

 

Basically it seems to switch the set of assemblies in use depending on what platform it is using. So if you stick to a certain set of core libraries then you are set.

 

For instance these classes

  • System.Collections.ObjectModel.ObservableCollection(Of T)
  • System.Collections.ObjectModel.ReadOnlyObservableCollection(Of T)
  • System.Collections.Specialized.INotifyCollectionChanged
  • System.Collections.Specialized.NotifyCollectionChangedAction
  • System.Collections.Specialized.NotifyCollectionChangedEventArgs
  • System.Collections.Specialized.NotifyCollectionChangedEventHandler
  • System.Windows.Input.ICommand

 

Are not available on platforms. How do you target Silveright and WPF in this case? You state in your project what you wish to target....

 

 

Xbox 360? I heard they were putting Silverlight apps up on there. Anyway it will warn you which assemblies are no-go for your multiple platform targeting...

 

 

I can also see it being useful for those libraries we roll out across Regum such as Commanding where we often use them across WPF and Silverlight.

 

Add comment


Security code
Refresh

Make Contact

We provide a free workshop for
  • Your ideas and requirements
  • The process we use
  • Understanding of the costs

  • Call us on +61 3 8352 6222

    Redgum Technologies Pty Ltd on LinkedIn

    Companies
    we have
    worked with: