如何将独立的exe项目压缩到1MB以下?
我必须开发一个提供一些基本功能的应用程序,如图所示:
它必须显示一个表格完全静态且不涉及 CRUD 的条目。我首先使用 .NET winforms 制作了这个应用程序,但安装的大小(包括 .net 客户端运行时)达到了 50 MB 以上,但我的客户想要小于 1 MB 的东西。有没有一种方法可以开发这样的应用程序,它可以作为独立的可执行文件运行,提供条目的表格列表、搜索和打印。我不知道我应该针对哪种语言。
I have to develop an application that offers some basic functionality as shown in figure:
It has to display a table of entries that is totally static and does not involve CRUD. I first made this app using .NET winforms but the size of setup (including .net client runtime) reached over 50 MB but my client wants something less than one MB. Is there a way I can develop such application that can run as stand alone executable providing tabular listing of entries, searching and printing. I don't know what language I should target.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我非常确定,当使用 C 和本机 Windows API 时,可以创建一个应用程序,而无需安装任何额外的运行时环境,该应用程序的大小将保持在 1MB 以下。另一方面:您的客户真的愿意为这种方法支付额外的开发成本吗?
I am pretty sure that when using C and the native Windows API, it would be possible to create an application without any additional runtime environment to install, which will remain below 1MB. On the other hand: is your client really willing to pay the additional development costs for this approach?
我不能保证这会让你的内存大小低于 1MB,但我猜它至少会让你接近 1MB。您可以编辑项目属性并将所有 .NET Framework 项(包括客户端运行时)设置为项目的先决条件。这样,它们必须安装在客户端 PC 上才能运行安装,并且不会捆绑在安装程序中。
I can't guarantee that this will get you below 1MB, but I'm guessing it'll get you at least close. You can edit your project properties and set all of the .NET framework items (including the client runtime) as prerequisites to your project. That way they must be installed on the client PC in order for your installation to run and won't be bundled in your installer.
Silverlight 4 运行时约为 6MB,比 50MB 更接近 1MB,但还不够。
The Silverlight 4 runtime is ~6MB, that is closer to 1MB than your 50MB, but not quite there.