Can I add dll to Silverlight 3 application?

蓝咒 提交于 2019-12-21 04:59:52

问题


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.


回答1:


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




回答2:


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




回答3:


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)



来源:https://stackoverflow.com/questions/2354660/can-i-add-dll-to-silverlight-3-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!