This project is read-only.

FileNotFoundException creating Self Extracting File (

Jan 27, 2014 at 6:37 PM
Edited Jan 28, 2014 at 6:39 PM
I am using: [assembly: AssemblyVersion ("")] and getting the following error when I try and create a Self Extracting File.


exception: System.IO.FileNotFoundException: Could not find file '[filename]/full.exe'.
File name: '[filename]/full.exe'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share)
at Ionic.Zip.ZipFile.get_ReadStream()
at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)
at Ionic.Zip.ZipFile.Reset(Boolean whileSaving)
at Ionic.Zip.ZipFile.Save()
at Ionic.Zip.ZipFile.SaveSelfExtractor(String exeToGenerate, SelfExtractorSav
eOptions options)
at GenerateOfflineBrowser.CopyFiles.ZipUp(Boolean bVersion)


using (ZipFile zip = new ZipFile()) {
    zip.AddDirectory(_destinationFolder); // recurses subdirectories

SelfExtractorSaveOptions options = new SelfExtractorSaveOptions();

    options.Flavor = SelfExtractorFlavor.WinFormsApplication;
    options.DefaultExtractDirectory = "%USERPROFILE%\\extracthere";
    options.RemoveUnpackedFilesAfterExecute = true;

zip.SaveSelfExtractor(EXEFileToCreate, options);

The code is in a DLL that is used in a console EXE program. It is zipping up files and then saving as an EXE file.

Any help would be appreciated!