We recently undertook a project to supply a web app with handheld device functionality.  As is the case with these things we needed to share the Business Objects between the web app and each handheld device. 

For anybody looking at doing this start here: http://msdn.microsoft.com/en-gb/magazine/cc163387.aspx

The quick (and simple) way to share assemblies is to create a CF class library, copy the .csproj file to your existing Full Framework 'Business Object' project folder, edit the copied .csproj file with notepad and then add the codefiles you want to share to this new class library.  You then add any relevant compilation symbols to the code so that what isn't relevant to the CF won't make you code explode in a mess of sprockets and shrapnel.

You then just need to add a reference to the newly moved .csproj file in your mobile project and thats it.  From now on any changes in the FF Business Object classes are reflected in the CF Business Object classes (because they are the same files) and vice versa.

Simple.

 

 

 


Sapere Software Blog

Software Development, .NET and Other Stuff