简体   繁体   English

从Inno Setup向GAC添加程序集

[英]Adding assemblies to the GAC from Inno Setup

I am developing some XBAP Applications that uses Fluent nHibernate and mshtml. 我正在开发一些使用Fluent nHibernate和mshtml的XBAP应用程序。

The problem is: 问题是:

The size of the nHibernate.dll (2.080 KB) and Microsoft.mshtml.dll (7.826 KB) 所述nHibernate.dll(2.080 KB)和Microsoft.mshtml.dll的大小(7.826 KB)

I would like to create a Pre-requisites installer to my application, so it copies these files to GAC. 我想为我的应用程序创建一个先决条件安装程序,因此它将这些文件复制到GAC。 So all my XBAPs that use these files can find them in GAC, and have the Publish folder size reduced to just the XBAP dlls. 所以我使用这些文件的所有XBAP都可以在GAC中找到它们,并将Publish文件夹大小减少到只有XBAP dll。

Could somebody put an Inno Setup Example Script that does copies these assemblies to GAC ? 有人可以把Inno安装示例脚本复制到GAC吗?

My XBAP Publish was about 11 MB now it is about only 1.7 MB. 我的XBAP发布大概是11 MB,现在大约只有1.7 MB。

I used this Inno Setup Script (.iss): 我使用了这个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"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM