我正在开发一些使用Fluent nHibernate和mshtml的 XBAP 应用程序。
问题是:
nHibernate.dll (2.080 KB)和 Microsoft.mshtml.dll (7.826 KB)的大小
我想为我的应用程序创建一个先决条件安装程序,因此它将这些文件复制到GAC。 所以我使用这些文件的所有XBAP都可以在GAC中找到它们,并将Publish文件夹大小减少到只有XBAP dll。
有人可以将 Inno安装示例脚本复制到 GAC 吗?
答案 0 :(得分:8)
我的XBAP发布大概是11 MB,现在大约只有1.7 MB。
我使用了这个Inno安装脚本(.iss):
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Company"
#define MyAppVersion "2.0"
#define MyAppPublisher "Tony Sistemas"
#define MyAppURL "http://www.tonysistemas.com.br/"
#define MyAppExeName "Initialize.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={{2DF12035-BD5C-4F86-90D3-00ACA5A30279}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=instalar
Compression=lzma
SolidCompression=yes
[Languages]
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
[Tasks]
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
;Source: "C:\Program Files\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
;Source: "C:\Users\Tony\Desktop\C#\Setup\Microsoft.mshtml.dll"; DestDir: "C:\Windows\assembly"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "C:\Users\Tony\Desktop\C#\Setup\Microsoft.mshtml.dll"; DestDir: "{app}"; StrongAssemblyName: "Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A, ProcessorArchitecture=MSIL"; Flags: "gacinstall sharedfile uninsnosharedfileprompt"
Source: "C:\Users\Tony\Desktop\C#\Setup\NHibernate.dll"; DestDir: "{app}"; StrongAssemblyName: "NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=AA95F207798DFDB4, ProcessorArchitecture=MSIL"; Flags: "gacinstall sharedfile uninsnosharedfileprompt"
Source: "C:\Users\Tony\Desktop\C#\Setup\FluentNHibernate.dll"; DestDir: "{app}"; StrongAssemblyName: "FluentNHibernate, Version=1.1.0.685, Culture=neutral, PublicKeyToken=8AA435E3CB308880, ProcessorArchitecture=MSIL"; Flags: "gacinstall sharedfile uninsnosharedfileprompt"
Source: "C:\Users\Tony\Desktop\C#\Setup\WPFVisifire.Charts.dll"; DestDir: "{app}"; StrongAssemblyName: "WPFVisifire.Charts, Version=2.2.4.0, Culture=neutral, PublicKeyToken=99D724542E4DB593, ProcessorArchitecture=MSIL"; Flags: "gacinstall sharedfile uninsnosharedfileprompt"
Source: "C:\Users\Tony\Desktop\C#\Setup\MySql.Data.dll"; DestDir: "{app}"; StrongAssemblyName: "MySql.Data, Version=6.3.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D, ProcessorArchitecture=MSIL"; Flags: "gacinstall sharedfile uninsnosharedfileprompt"
Source: "C:\Users\Tony\Desktop\C#\Setup\WPFToolkit.dll"; DestDir: "{app}"; StrongAssemblyName: "WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31BF3856AD364E35, ProcessorArchitecture=MSIL"; Flags: "gacinstall sharedfile uninsnosharedfileprompt"