How to create self-extracted exe C# .net 4.0

夙愿已清 提交于 2020-01-07 07:27:09

问题


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

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

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


回答1:


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.



来源:https://stackoverflow.com/questions/37058709/how-to-create-self-extracted-exe-c-sharp-net-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!