开发者

Can I add dll to Silverlight 3 application?

开发者 https://www.devze.com 2022-12-21 08:09 出处:网络
I am tring to add dll file to my Silverlight application but get error which says t开发者_如何学编程hat I can\'t add reference which wasn\'t built with Silverlight runtime.

I am tring to add dll file to my Silverlight application but get error which says t开发者_如何学编程hat I can't add reference which wasn't built with Silverlight runtime.

Is there any solution?

Thanks.


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


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


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消