I have written a C# class library (DLL) and wondering the quickest way to make this usable in Silverlight? Presumably I will have to convert it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The difference between a .NET class library and a Silverlight class library is that they reference a different set of “core” assemblies, e.g.
mscorlib.dll,System.dll, etc.If you have the sources: You can convert the .NET class library to a Silverlight class library simply by starting a new Silverlight Class Library project in Visual Studio and copy&paste all sources. You’d have to fix all API calls that are different in Silverlight, of course.
If you don’t have the sources: I don’t know if there’s a good way to directly convert the assembly. I doubt you can just replace the references to the .NET assembles with references to Silverlight assemlies. The only way I can think of using .NET Reflector to decompile the assembly and re-compile it as above.