从 Silverlight 发布获取代码?
有没有办法从 Silverlight 发布中获取代码?
我的笔记本电脑完全崩溃了,我的应用程序中唯一留下的就是已发布的网站。
有没有工具或其他东西可以从我的应用程序中获取代码?
Is there a way to get the code from a Silverlight publish?
My laptop has completely crashed, and the only thing I have left from my application, is the published website.
Is there a tool or something to get the code from my application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以将 xap 重命名为 zip,将其解压,然后使用 Reflector 提取代码。但它不会准确地恢复它或恢复 XAML。据我所知,没有办法对 XAML 进行逆向工程。
编辑:Shawn +1 指出 XAML 存储为纯文本资源,因此您也可以恢复它。不太确定为什么会这样做,但是嘿,这是个好消息:-)
You can rename the xap to zip, extract it, and use Reflector to pull out the code. It won't recover it exactly or recover the XAML though. As far as I know there's no way to reverse engineer XAML.
Edit: +1 for Shawn for pointing out that the XAML is stored as plaintext resources, so you can recover that too. Not quite sure why it does that, but hey, it's good news :-)
使用 .NET Reflector,您可以可以处理所有 XAML。它以纯文本形式存储为资源。
Using .NET Reflector you can can all the XAML. It's stored as resources in plain text.
尝试Silverlight Spy。它是调试 Silverlight 的绝佳工具。如果与 .NET Reflector 结合使用,可以查看反编译代码任何正在运行的 Silverlight 应用程序。
顺便说一句,此处是 Silverlight Spy 的所有功能。
Try Silverlight Spy. It's a great tool for debugging Silverlight. If you use it in combination with .NET Reflector you can view the decompiled code of any running Silverlight application.
BTW, here are all features of Silverlight Spy.
JetBrains 已推出 DotPeek。它目前是免费的(我希望它保持这种状态,与 .NET Reflector 不同)。
它还会将 Silverlight DLL 文件一直转换回可读的源代码!我已经在几个 Silverlight 项目中尝试过它,它的效果非常好。
**注意:截至撰写本文时,它仍然存在一些错误:字符串连接和事件处理程序生成错误的代码。*
JetBrains have made DotPeek available. It is currently free (I hope it stays that way, unlike .NET Reflector).
It will also convert Silverlight DLL files all the way back to readable source code! I have tried it on several Silverlight projects, and it works like a charm.
**Note: as of the time of this writing it still gets a couple of things wrong: string concatenations and event handlers generate the wrong code.*