问题
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