Index: tools/install/Installer.cs ================================================================== --- tools/install/Installer.cs +++ tools/install/Installer.cs @@ -1913,10 +1913,11 @@ Assembly assembly, string logFileName, string directory, string coreFileName, string linqFileName, + string ef6FileName, string designerFileName, string registryVersion, string configVersion, string vsVersionSuffix, string debugFormat, @@ -1953,10 +1954,11 @@ this.assembly = assembly; this.logFileName = logFileName; this.directory = directory; this.coreFileName = coreFileName; this.linqFileName = linqFileName; + this.ef6FileName = ef6FileName; this.designerFileName = designerFileName; this.registryVersion = registryVersion; this.configVersion = configVersion; this.vsVersionSuffix = vsVersionSuffix; this.debugFormat = debugFormat; @@ -1996,10 +1998,11 @@ #region Private Static Methods private static void GetDefaultFileNames( ref string directory, ref string coreFileName, ref string linqFileName, + ref string ef6FileName, ref string designerFileName ) { if (thisAssembly == null) return; @@ -2012,10 +2015,13 @@ coreFileName = Path.Combine(directory, Installer.CoreFileName); linqFileName = Path.Combine(directory, Installer.LinqFileName); + + ef6FileName = Path.Combine(directory, + Installer.Ef6FileName); designerFileName = Path.Combine(directory, Installer.DesignerFileName); } @@ -2124,19 +2130,21 @@ public static Configuration CreateDefault() { string directory = null; string coreFileName = null; string linqFileName = null; + string ef6FileName = null; string designerFileName = null; GetDefaultFileNames( ref directory, ref coreFileName, ref linqFileName, - ref designerFileName); + ref ef6FileName, ref designerFileName); - return new Configuration(thisAssembly, null, directory, - coreFileName, linqFileName, designerFileName, null, null, - null, TraceOps.DebugFormat, TraceOps.TraceFormat, + return new Configuration( + thisAssembly, null, directory, coreFileName, linqFileName, + ef6FileName, designerFileName, null, null, null, + TraceOps.DebugFormat, TraceOps.TraceFormat, InstallFlags.Default, TracePriority.Default, TracePriority.Default, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, false, false); @@ -2346,10 +2354,21 @@ if (String.IsNullOrEmpty(linqFileName)) linqFileName = Installer.LinqFileName; configuration.linqFileName = Path.Combine( configuration.directory, linqFileName); + + string ef6FileName = configuration.ef6FileName; + + if (!String.IsNullOrEmpty(ef6FileName)) + ef6FileName = Path.GetFileName(ef6FileName); + + if (String.IsNullOrEmpty(ef6FileName)) + ef6FileName = Installer.Ef6FileName; + + configuration.ef6FileName = Path.Combine( + configuration.directory, ef6FileName); string designerFileName = configuration.designerFileName; if (!String.IsNullOrEmpty(designerFileName)) designerFileName = Path.GetFileName(designerFileName); @@ -2357,10 +2376,14 @@ if (String.IsNullOrEmpty(designerFileName)) designerFileName = Installer.DesignerFileName; configuration.designerFileName = Path.Combine( configuration.directory, designerFileName); + } + else if (MatchOption(newArg, "ef6FileName")) + { + configuration.ef6FileName = text; } else if (MatchOption(newArg, "install")) { bool? value = ParseBoolean(text); @@ -3263,10 +3286,23 @@ return !noNetFx35 || !noNetFx40 || !noNetFx45 || !noNetFx451; } /////////////////////////////////////////////////////////////////// + public bool IsEf6Supported() + { + // + // NOTE: Return non-zero if the EF6 assembly should be + // processed during the install. If the target is + // Visual Studio 2005 or Visual Studio 2008, this + // should return zero. + // + return !noNetFx40 || !noNetFx45 || !noNetFx451; + } + + /////////////////////////////////////////////////////////////////// + public void Dump( TraceCallback traceCallback ) { if (traceCallback != null) @@ -3288,10 +3324,14 @@ traceCategory); traceCallback(String.Format(NameAndValueFormat, "LinqFileName", ForDisplay(linqFileName)), traceCategory); + + traceCallback(String.Format(NameAndValueFormat, + "Ef6FileName", ForDisplay(ef6FileName)), + traceCategory); traceCallback(String.Format(NameAndValueFormat, "DesignerFileName", ForDisplay(designerFileName)), traceCategory); @@ -3484,10 +3524,19 @@ public string LinqFileName { get { return linqFileName; } set { linqFileName = value; } } + + /////////////////////////////////////////////////////////////////// + + private string ef6FileName; + public string Ef6FileName + { + get { return ef6FileName; } + set { ef6FileName = value; } + } /////////////////////////////////////////////////////////////////// private string designerFileName; public string DesignerFileName @@ -3877,10 +3926,11 @@ /////////////////////////////////////////////////////////////////////// #region Private Constant Data private const string CoreFileName = "System.Data.SQLite.dll"; private const string LinqFileName = "System.Data.SQLite.Linq.dll"; + private const string Ef6FileName = "System.Data.SQLite.EF6.dll"; private const string DesignerFileName = "SQLite.Designer.dll"; private const string ProviderName = "SQLite Data Provider"; private const string ProjectName = "System.Data.SQLite"; private const string LegacyProjectName = "SQLite"; private const string InvariantName = "System.Data.SQLite"; @@ -6557,10 +6607,23 @@ debugCallback, traceCallback, String.Format( "GacInstall: assemblyPath = {0}", ForDisplay(configuration.LinqFileName)), traceCategory); } + + if (configuration.IsEf6Supported()) + { + if (!configuration.WhatIf) + /* throw */ + publish.GacInstall(configuration.Ef6FileName); + + TraceOps.DebugAndTrace(TracePriority.Highest, + debugCallback, traceCallback, String.Format( + "GacInstall: assemblyPath = {0}", + ForDisplay(configuration.Ef6FileName)), + traceCategory); + } if (configuration.HasFlags( InstallFlags.VsPackageGlobalAssemblyCache, true)) { if (!configuration.WhatIf) @@ -6587,10 +6650,23 @@ debugCallback, traceCallback, String.Format( "GacRemove: assemblyPath = {0}", ForDisplay(configuration.DesignerFileName)), traceCategory); } + + if (configuration.IsEf6Supported()) + { + if (!configuration.WhatIf) + /* throw */ + publish.GacRemove(configuration.Ef6FileName); + + TraceOps.DebugAndTrace(TracePriority.Highest, + debugCallback, traceCallback, String.Format( + "GacRemove: assemblyPath = {0}", + ForDisplay(configuration.Ef6FileName)), + traceCategory); + } if (configuration.IsLinqSupported()) { if (!configuration.WhatIf) /* throw */