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
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.
ZipFile
class, I have something good to tell you: TheZipFile
class is actually usable in .NET 4.0! You just have to import theSystem.IO.Compression.FileSystem.dll
file, which is located somewhere in%SystemRoot%\Microsoft.NET\assembly\GAC_MSIL
. Try searching for it there, and when found just import it as a reference to your project and it'll work!%SystemRoot%\Microsoft.NET\assembly\GAC_MSIL\System.IO.Compression.FileSystem\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.FileSystem.dll
.System.IO.Compression
namespace is the incorrect version... Are you sure you haven't accidentelly imported/referenced another version of it?