Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I add dll to Silverlight 3 application?

I am tring to add dll file to my Silverlight application but get error which says that I can't add reference which wasn't built with Silverlight runtime.
Is there any solution?
Thanks.

like image 228
Samvel Siradeghyan Avatar asked Mar 01 '10 08:03

Samvel Siradeghyan


3 Answers

Try to use WCF Service to connect to your DLL.I did that way and it solved my problem.

like image 81
Noro Avatar answered Nov 17 '22 03:11

Noro


Try creating an empty Silverlight class library, then add all your code to that project, then you will be able to add it to a silverlight application as a reference.

If this does not meet your needs, upgrade to Silverlight 4, you should be able to add libraries to your project with no problems, but the library will still run in the limited security context of the silverlight runtime

Edit:

Try using a reflector like C# reflector for .net to disassemble the dll, then you can migrate the code, otherwise best advice is to move to Silverlight 4 if you are just starting the project

like image 35
Neil Avatar answered Nov 17 '22 04:11

Neil


Nothing you can do for S3 unless you have access to the source (Even if you did have the source, the silverlight sandbox is restrictive so it probably wouldn't compile anyway)

like image 31
vidalsasoon Avatar answered Nov 17 '22 04:11

vidalsasoon