如何创建自解压exe C#.net 4.0 [英] How to create self-extracted exe C# .net 4.0

查看:324
本文介绍了如何创建自解压exe C#.net 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个单独的exe文件,该文件将提取出一个文件夹,里面包含很多东西.

I want to make single exe file that will extract a Folder with a lot of stuff inside.

我希望此exe在具有.net 4.0的计算机上工作

I want this exe to work on computers with .net 4.0

我正尝试使用该文件夹解压缩嵌入式zip归档文件,但是对于.net 4.0而言,这并不简单

I was trying to decompress embedded zip archive with the folder, but it is not simple with .net 4.0

推荐答案

通过将.zip文件添加到C#安装程序项目并将其构建操作"设置为嵌入式资源",您应该能够做到这一点.然后,您的C#安装程序将使用

You should be able to do this by adding a .zip file to your C# installer project and setting its Build Action to "Embedded Resource." Then, your C# installer program would extract that file from itself using Assembly.GetManifestResourceStream, writing the contents of the stream to disk.

这篇关于如何创建自解压exe C#.net 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆