Dear ladies and sirs.
We have some .NET client side code, which we would like to port to Silverlight. However, the current .NET code simply does not compile on the Silverlight platform. Along with some subtle issues, there are many simple issues, like: - some exceptions have less constructors in SL - Debug.Fail does not exist in SL - BindingList does not exist in SL - severe limitations are placed on private reflection etc...
Some of these differences can be applied to the plain .NET code, in order to minimize the differences between the .NET and SL code base. Like I do not mind to call Debug.Assert
with false
instead of Debug.Fail
in my .NET code if it makes the code less polluted with #if SILVERLIGHT
. The same is true about replacing BindingList
with ObservableCollection
.
My question is there a tool which given a .NET assembly can present some kind of Silverlight compatibility report, which would indicate the changes that must be made to the .NET code base in order to bring it as close as possible to the Silverlight platform?
Thanks.
EDIT:
The tool does slightly more complex job that just compiling the code in SL and presenting the errors. This has to do with code present in SL and .NET, but in SL it is unavailable to the regular (transparent) code. Invoking it would result in an exception on SL.
EDIT 2:
A few words of further clarifications are due:
- The code is not a UI code. It is neither WinForms, nor WebForms nor WPF. It is pure business logic code upon which the client side UI depends.
- We base our business logic on the Lhotka's CSLA library, which does have an SL port.
- Using VS to compile the project in SL only reports the compilation errors. It will not notify me of any invalid API usages, like invoking a method which is SecurityCritical in SL.