将 C# (.NET 2.0) 应用程序部署为可移植应用程序?
是否可以将 .NET 2.0 应用程序部署为可移植可执行文件? 这样我的程序就可以在闪存盘中运行,而无需在目标计算机上安装.NET Framework 2.0。 或者是否可以使用所需的 .NET DLL 来分发我的程序,从而无需安装框架?
我知道有一些替代工具可以将我的 .NET exe 转换为单个本机可执行文件,例如 RemoteSoft Salamander、Xenocode Postbuild 和 Thinstall,但不幸的是我买不起。
我还尝试将依赖项嵌入到 Mono 的 mkbundle 中,但它弄乱了我的程序 =\ (没有 XP 视觉风格,破坏了一些控件及其功能)
任何类型的帮助将不胜感激:)
谢谢。
仅供参考:我的 IDE 是 Microsoft Visual C# 2008 Express Edition,以 .NET Framework 2.0 作为目标框架。
Is it possible to deploy a .NET 2.0 application as a portable executable?
So that my program can be ran in a Flash Disk without the .NET Framework 2.0 installed in the target machine. Or maybe is it possible to distribute my program with the required .NET DLLs, so that no framework installation is necessary?
I know that there are some alternative tools to turn my .NET exe into a single native executable like RemoteSoft Salamander, Xenocode Postbuild, and Thinstall, but unfortunately I can't afford one.
I also tried to embed the dependencies with Mono's mkbundle, but it messed my program up =\ (no XP visual style, broke some controls and its functionality)
Any kind of help would be appreciated :)
Thanks.
fyi: my IDE is Microsoft Visual C# 2008 Express Edition with .NET Framework 2.0 as the target framework.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
那么,除了 Salamander 和 Thinstall(现在的 VMWare ThinApp)之类的东西之外,如果您确实想运行 .NET,则必须安装 .NET。
可能无需实际安装即可运行Mono(不是静态链接您的程序) ,但包括闪存驱动器上的 Mono)。 我怀疑这会很棘手,因为您必须告诉运行时有关 GAC 位置等信息。
我在 Mono 常见问题解答中看不到任何与此相关的内容,但您可能想要 ping Mono 邮件列表 - 这听起来可能是一件有趣且有用的事情。
Well, other than things like Salamander and Thinstall (now VMWare ThinApp) you would have to have .NET installed if you really want to run .NET.
It may be possible to run Mono without actually installing it (not statically linking your program, but including Mono on the flash drive). I suspect it would be tricky though, as you'd have to tell the runtime about things like the GAC location.
I can't see anything in the Mono FAQ about this, but you might want to ping a Mono mailing list - it sounds like a potentially interesting and useful thing to be able to do.
不; 您需要安装框架或您提到的工具。
您可以看看mono的新静态链接器,但仅此而已......
No; you need either the framework installed, or the tools like you have mentioned.
You could potentially look at mono's new static linker, but that is about it...
我自己没有尝试过,但过程如下:
-- 来源:http://www.codeproject.com/Tips/392308 /Csharp-Portable-Exe-文件
I have not tried this myself but here's the procedure:
-- Source: http://www.codeproject.com/Tips/392308/Csharp-Portable-Exe-File
Thinstall 非常昂贵,而且并非在所有情况下都有效。 如果您想在没有安装 .Net 的情况下运行您的应用程序,您可能会遇到麻烦,尽管有一些工具可以做到这一点 Xenocode 有一个工具可以为您完成此操作,并且比 thinstall 便宜。
但如果你问我的意见,使用它们是个坏主意。 更好地说服你的目标市场安装 .Net 2(这在当今几乎是通用的),然后使用一种更便宜的类似混淆器的工具将所有库文件打包到一个文件中(Smartassemble。)
我已经使用 Thinstall 很长时间了,并且我在这项技术上做了很多工作,所以我不会立即离开没有经验。
Well Thinstall is very expensive and it doesn't work in all situations. If you want to run your app without .Net installed you might run into trouble although there are tools that do that Xenocode has a tool that can do this for you and it's cheaper than thinstall.
But if you ask my opinion it's a bad idea to use them. Better convince your target market to install .Net 2 (Which is pretty much universal these days), and then pack all of your library files into one file using a cheaper Obfuscator like tool (There's a good one from Smartassembly.)
I've used Thinstall for a long time, and I've worked on this technology a lot, so I am not shooting off without experience.