开发者

Is it possible to run Silverlight code using the runtime of the full .NET framework?

To integrate with the current system for continuous integration, we want to use NUnit for testing (non UI) Silverlight code. Doing this means executing Silverlight code using the runtime of the full .NET framework which usually works just fine as long as not actually using Silverlight specific classes such as the visual elements or DependencyObject. However, some general purpose libraries such as the Reactive Extensions for Silverlight also appears to have a dependency on the Silverlight runtime (agcore).

Is there a way of tricking the runtime into redirecting Silverlight runtime dependencies into some mock version of them? Or is it possible to redirect assembly references such as Reactive Extensions at runtime altogether (when running unit tests only) and load their corresponding counterpart for the f开发者_高级运维ull .NET framework instead?


I would just roundtrip the DLLs using ildasm / ilasm and write a Perl script to munge the .il file - I do a similar trick to convert a .NET 2.0 DLL to 4.0 here:

http://blog.paulbetts.org/index.php/2009/12/03/convert-a-net-2-0-dll-to-net-4-0-without-sourc/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜