Creating single setup file using ClickOnce
c#, clickonce, winforms
Solution
You should create a wrapper setup around ClickOnce.
- Extract all files to temp dir
- Run Setup.exe from temp dir
I use InnoSetup for this purpose, which is open Source
A basic setup could look like this:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "..."
#define MyAppVersion "1"
#define MyAppPublisher "..."
#define MyAppURL "http://..."
#define MyAppExeName "setup.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{...-...-...-....-.........}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=no
LicenseFile={#SourcePath}resources\license.txt
OutputDir={#SourcePath}setup\disk
OutputBaseFilename=setup
SetupIconFile={#SourcePath}resources\app.ico
WizardImageFile={#SourcePath}resources\app.bmp
WizardSmallImageFile={#SourcePath}resources\app.bmp
Compression=lzma
SolidCompression=yes
Uninstallable=no
DisableFinishedPage=yes
;PrivilegesRequired=none
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Files]
Source: {#SourcePath}files\*; DestDir: "{tmp}"; Flags: ignoreversion
[Run]
Filename: {tmp}\setup.exe; Parameters: "install"
Note: `{#SourcePath}files\*` should point to the directory where your setup.exe / MyApp.application files and the Application Files folder live. Not testet but should give your a good start.
The result is a single exe file that includes everything you need. Don't forget to clean the ClickOnce directory before creating a new setup otherwise the Application Files folder will contain the last version, too.
Problem
I have created one Windows Forms application and published it using ClickOnce. It generated the setup file with application files and it working good with update checking also. But in "Application Files" folder it displaying the deployed files of all the DLL files I have used. There is no point in showing those `dll` names to user, and I don't want to reveal those DLL files I have used. So is it possible to give only the setup file to user and which perform as it performed before? I'm using Visual Studio 2013 express edition (desktop). Or another way then ClickOnce? But I found ClickOnce is best . I have tried `Ilmerge`, but it's not merging `Sqlite.Interop.dll` and is throwing an error. After researching much I found that the issue is with SQLite itself.