From 894310fae5676f245f6d8b98638ceb4758442cbd Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 27 Nov 2017 18:01:06 +0100 Subject: [PATCH 01/13] Added property ClientExecutablePath to customize AppHost.Client base path. --- RedGate.AppHost.Server/ChildProcessFactory.cs | 19 +++++++++++-------- RedGate.AppHost.Server/ProcessStarter.cs | 10 +++++++--- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/RedGate.AppHost.Server/ChildProcessFactory.cs b/RedGate.AppHost.Server/ChildProcessFactory.cs index 30a045e..919afc8 100644 --- a/RedGate.AppHost.Server/ChildProcessFactory.cs +++ b/RedGate.AppHost.Server/ChildProcessFactory.cs @@ -2,17 +2,20 @@ { public class ChildProcessFactory { - public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess) - { + public string ClientExecutablePath { get; set; } + + public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess) { IProcessStartOperation processStarter; - if (is64Bit) - { - processStarter = new ProcessStarter64Bit(); + if (is64Bit) { + processStarter = new ProcessStarter64Bit() { + ClientExecutablePath = ClientExecutablePath + }; } - else - { - processStarter = new ProcessStarter32Bit(); + else { + processStarter = new ProcessStarter32Bit() { + ClientExecutablePath = ClientExecutablePath + }; } return new RemotedProcessBootstrapper( diff --git a/RedGate.AppHost.Server/ProcessStarter.cs b/RedGate.AppHost.Server/ProcessStarter.cs index c7d42b5..73fa6df 100644 --- a/RedGate.AppHost.Server/ProcessStarter.cs +++ b/RedGate.AppHost.Server/ProcessStarter.cs @@ -8,9 +8,13 @@ internal abstract class ProcessStarter : IProcessStartOperation { protected abstract string ProcessFileName { get; } - public Process StartProcess(string assemblyName, string remotingId, bool openDebugConsole, bool monitorHostProcess) - { - string executingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + public string ClientExecutablePath { get; set; } + + public Process StartProcess(string assemblyName, string remotingId, bool openDebugConsole, bool monitorHostProcess) { + string executingDirectory = string.IsNullOrEmpty(ClientExecutablePath) + ? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + : ClientExecutablePath; + string quotedAssemblyArg = "\"" + Path.Combine(executingDirectory, assemblyName) + "\""; var processToStart = Path.Combine(executingDirectory, ProcessFileName); From 5b5f33b9ae7d87a8965e0dbca4e989416ad869b2 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 27 Nov 2017 18:06:32 +0100 Subject: [PATCH 02/13] Fix nuspec for publishing Nuget package --- NuSpec/RedGate.AppHost.nuspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NuSpec/RedGate.AppHost.nuspec b/NuSpec/RedGate.AppHost.nuspec index ac59c47..933cf47 100644 --- a/NuSpec/RedGate.AppHost.nuspec +++ b/NuSpec/RedGate.AppHost.nuspec @@ -1,12 +1,12 @@ - RedGate.AppHost + CefSharp-Remoting.RedGate.AppHost 1.0.0 - Red Gate Out of Process App Host + CefSharp-Remoting fork of Red Gate Out of Process App Host Red Gate Red Gate - https://github.com/red-gate/RedGate.AppHost + https://github.com/rupertsciamenna89/RedGate.AppHost false Provides a way to host a UI out of process and remote it in Provides a way to host a UI out of process and remote it in From 6000b107aec3bb3f75f64336f6d171edc103a535 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 27 Nov 2017 18:14:44 +0100 Subject: [PATCH 03/13] Fix Framework Version. Fix not included app.config. --- .../RedGate.AppHost.Client.csproj | 42 +++++++++++- .../RedGate.AppHost.Client.x64.csproj | 10 ++- RedGate.AppHost.Client/app.config | 3 + RedGate.AppHost.Client/packages.config | 2 +- .../RedGate.AppHost.Example.Client.csproj | 5 +- ...ate.AppHost.Example.Remote.Services.csproj | 4 +- .../Properties/Resources.Designer.cs | 66 ++++++++----------- .../Properties/Settings.Designer.cs | 30 ++++----- .../RedGate.AppHost.Example.Server.csproj | 6 +- RedGate.AppHost.Example.Server/app.config | 3 + .../RedGate.AppHost.Interfaces.csproj | 9 ++- .../RedGate.AppHost.Remoting.WPF.csproj | 9 ++- .../RedGate.AppHost.Remoting.csproj | 9 ++- .../RedGate.AppHost.Server.csproj | 6 +- 14 files changed, 131 insertions(+), 73 deletions(-) create mode 100644 RedGate.AppHost.Client/app.config create mode 100644 RedGate.AppHost.Example.Server/app.config diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj index 06e6abb..b0591db 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj @@ -9,10 +9,26 @@ Properties RedGate.AppHost.Client RedGate.AppHost.Client - v4.0 + v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + @@ -26,6 +42,7 @@ x64 prompt MinimumRecommendedRules.ruleset + false bin\x64\Release\ @@ -36,6 +53,7 @@ x64 prompt MinimumRecommendedRules.ruleset + false true @@ -46,6 +64,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false ..\Build\Release\ @@ -56,6 +75,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false @@ -110,12 +130,30 @@ + + + + False + Microsoft .NET Framework 4 %28x86 e x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 4.5 + true + + @@ -108,6 +113,7 @@ + diff --git a/RedGate.AppHost.Client/app.config b/RedGate.AppHost.Client/app.config new file mode 100644 index 0000000..ff99501 --- /dev/null +++ b/RedGate.AppHost.Client/app.config @@ -0,0 +1,3 @@ + + + diff --git a/RedGate.AppHost.Client/packages.config b/RedGate.AppHost.Client/packages.config index 7f3f641..fed523c 100644 --- a/RedGate.AppHost.Client/packages.config +++ b/RedGate.AppHost.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj b/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj index 3692b35..a86f2c2 100644 --- a/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj +++ b/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj @@ -9,10 +9,11 @@ Properties RedGate.AppHost.Example.Client RedGate.AppHost.Example.Client - v4.0 + v4.5.2 512 true \\red-gate.com\Files\RG_Build_Key\RedGate.snk + true @@ -23,6 +24,7 @@ prompt 4 true + false pdbonly @@ -32,6 +34,7 @@ prompt 4 true + false diff --git a/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj b/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj index 271d8b4..a4fe083 100644 --- a/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj +++ b/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj @@ -9,7 +9,7 @@ Properties RedGate.AppHost.Example.Remote.Services RedGate.AppHost.Example.Remote.Services - v4.0 + v4.5.2 512 true @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false diff --git a/RedGate.AppHost.Example.Server/Properties/Resources.Designer.cs b/RedGate.AppHost.Example.Server/Properties/Resources.Designer.cs index 32ed4e7..76f7a99 100644 --- a/RedGate.AppHost.Example.Server/Properties/Resources.Designer.cs +++ b/RedGate.AppHost.Example.Server/Properties/Resources.Designer.cs @@ -1,69 +1,61 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.18408 +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. // //------------------------------------------------------------------------------ -namespace RedGate.AppHost.Example.Server.Properties -{ - - +namespace RedGate.AppHost.Example.Server.Properties { + using System; + + /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder. + // tramite uno strumento quale ResGen o Visual Studio. + // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen + // con l'opzione /str oppure ricompilare il progetto VS. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// - /// Returns the cached ResourceManager instance used by this class. + /// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RedGate.AppHost.Example.Server.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le + /// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/RedGate.AppHost.Example.Server/Properties/Settings.Designer.cs b/RedGate.AppHost.Example.Server/Properties/Settings.Designer.cs index 76e40a6..7d7152b 100644 --- a/RedGate.AppHost.Example.Server/Properties/Settings.Designer.cs +++ b/RedGate.AppHost.Example.Server/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.18408 +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. // //------------------------------------------------------------------------------ -namespace RedGate.AppHost.Example.Server.Properties -{ - - +namespace RedGate.AppHost.Example.Server.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj b/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj index 1ad3654..08edf8f 100644 --- a/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj +++ b/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj @@ -9,10 +9,11 @@ Properties RedGate.AppHost.Example.Server RedGate.AppHost.Example.Server - v4.0 + v4.5.2 512 true \\red-gate.com\Files\RG_Build_Key\RedGate.snk + AnyCPU @@ -24,6 +25,7 @@ prompt 4 true + false AnyCPU @@ -34,6 +36,7 @@ prompt 4 true + false @@ -90,6 +93,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/RedGate.AppHost.Example.Server/app.config b/RedGate.AppHost.Example.Server/app.config new file mode 100644 index 0000000..ff99501 --- /dev/null +++ b/RedGate.AppHost.Example.Server/app.config @@ -0,0 +1,3 @@ + + + diff --git a/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj b/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj index c838c64..87830dd 100644 --- a/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj +++ b/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj @@ -9,9 +9,9 @@ Properties RedGate.AppHost.Interfaces RedGate.AppHost.Interfaces - v3.5 + v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk @@ -24,6 +24,7 @@ prompt 4 true + false pdbonly @@ -33,10 +34,12 @@ prompt 4 true + false - true + true + true diff --git a/RedGate.AppHost.Remoting.WPF/RedGate.AppHost.Remoting.WPF.csproj b/RedGate.AppHost.Remoting.WPF/RedGate.AppHost.Remoting.WPF.csproj index f629782..82d99ae 100644 --- a/RedGate.AppHost.Remoting.WPF/RedGate.AppHost.Remoting.WPF.csproj +++ b/RedGate.AppHost.Remoting.WPF/RedGate.AppHost.Remoting.WPF.csproj @@ -9,9 +9,9 @@ Properties RedGate.AppHost.Remoting.WPF RedGate.AppHost.Remoting.WPF - v3.5 + v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk @@ -24,6 +24,7 @@ prompt 4 true + false pdbonly @@ -32,10 +33,12 @@ TRACE prompt 4 + false - true + true + true diff --git a/RedGate.AppHost.Remoting/RedGate.AppHost.Remoting.csproj b/RedGate.AppHost.Remoting/RedGate.AppHost.Remoting.csproj index f052849..189774c 100644 --- a/RedGate.AppHost.Remoting/RedGate.AppHost.Remoting.csproj +++ b/RedGate.AppHost.Remoting/RedGate.AppHost.Remoting.csproj @@ -9,9 +9,9 @@ Properties RedGate.AppHost.Remoting RedGate.AppHost.Remoting - v3.5 + v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk @@ -24,6 +24,7 @@ prompt 4 true + false pdbonly @@ -33,10 +34,12 @@ prompt 4 true + false - true + true + true diff --git a/RedGate.AppHost.Server/RedGate.AppHost.Server.csproj b/RedGate.AppHost.Server/RedGate.AppHost.Server.csproj index d95c47e..23b2ad6 100644 --- a/RedGate.AppHost.Server/RedGate.AppHost.Server.csproj +++ b/RedGate.AppHost.Server/RedGate.AppHost.Server.csproj @@ -9,9 +9,9 @@ Properties RedGate.AppHost.Server RedGate.AppHost.Server - v3.5 + v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk @@ -24,6 +24,7 @@ prompt 4 true + false pdbonly @@ -33,6 +34,7 @@ prompt 4 true + false From 83dd4a66366bd4b7934872284fd0547e66c0283c Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 27 Nov 2017 18:18:08 +0100 Subject: [PATCH 04/13] Fix on sign and to CommanLineParser reference --- RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj | 5 +++-- RedGate.AppHost.Client/packages.config | 2 +- .../RedGate.AppHost.Example.Client.csproj | 2 +- .../RedGate.AppHost.Example.Remote.Services.csproj | 2 +- .../RedGate.AppHost.Example.Server.csproj | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj index 34e27b3..ff8e772 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj @@ -73,8 +73,9 @@ app.manifest - - ..\packages\CommandLineParser.1.9.71\lib\net40\CommandLine.dll + + ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll + True diff --git a/RedGate.AppHost.Client/packages.config b/RedGate.AppHost.Client/packages.config index fed523c..0c4d14e 100644 --- a/RedGate.AppHost.Client/packages.config +++ b/RedGate.AppHost.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj b/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj index a86f2c2..591dbf9 100644 --- a/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj +++ b/RedGate.AppHost.Example.Client/RedGate.AppHost.Example.Client.csproj @@ -11,7 +11,7 @@ RedGate.AppHost.Example.Client v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk diff --git a/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj b/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj index a4fe083..849ec04 100644 --- a/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj +++ b/RedGate.AppHost.Example.Remote.Services/RedGate.AppHost.Example.Remote.Services.csproj @@ -12,7 +12,7 @@ v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk diff --git a/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj b/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj index 08edf8f..b354229 100644 --- a/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj +++ b/RedGate.AppHost.Example.Server/RedGate.AppHost.Example.Server.csproj @@ -11,7 +11,7 @@ RedGate.AppHost.Example.Server v4.5.2 512 - true + false \\red-gate.com\Files\RG_Build_Key\RedGate.snk From 2a0a17a53d029a653d33e88e9cf0f676f4c3d3c0 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 27 Nov 2017 18:27:19 +0100 Subject: [PATCH 05/13] Fix nuspec directives --- NuSpec/RedGate.AppHost.nuspec | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/NuSpec/RedGate.AppHost.nuspec b/NuSpec/RedGate.AppHost.nuspec index 933cf47..789c7c9 100644 --- a/NuSpec/RedGate.AppHost.nuspec +++ b/NuSpec/RedGate.AppHost.nuspec @@ -8,37 +8,37 @@ Red Gate https://github.com/rupertsciamenna89/RedGate.AppHost false - Provides a way to host a UI out of process and remote it in - Provides a way to host a UI out of process and remote it in + Provides a way to host a UI out of process and remote it in. It's a CefSharp-Remoting fork. This package must not be used for production environment. It has only educative purpose. + Provides a way to host a UI out of process and remote it in. It's a CefSharp-Remoting fork. - - - + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + From 8e0212214f6c2fde88445a64c9435e957c745825 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Wed, 10 Jan 2018 10:58:41 +0100 Subject: [PATCH 06/13] CommandLine library update. Fix versioning in nuspec package --- NuSpec/RedGate.AppHost.nuspec | 4 ++-- RedGate.AppHost.Client/Program.cs | 7 ++++--- .../RedGate.AppHost.Client.csproj | 2 +- .../RedGate.AppHost.Client.x64.csproj | 4 ++-- RedGate.AppHost.Client/packages.config | 2 +- RedGate.AppHost.Server/ChildProcessFactory.cs | 20 ++----------------- RedGate.AppHost.Server/ChildProcessHandle.cs | 5 +---- RedGate.AppHost.Server/Native.cs | 2 +- .../RemotedProcessBootstrapper.cs | 5 ++--- 9 files changed, 16 insertions(+), 35 deletions(-) diff --git a/NuSpec/RedGate.AppHost.nuspec b/NuSpec/RedGate.AppHost.nuspec index 789c7c9..ca01d8c 100644 --- a/NuSpec/RedGate.AppHost.nuspec +++ b/NuSpec/RedGate.AppHost.nuspec @@ -2,7 +2,7 @@ CefSharp-Remoting.RedGate.AppHost - 1.0.0 + 1.0.1 CefSharp-Remoting fork of Red Gate Out of Process App Host Red Gate Red Gate @@ -16,7 +16,7 @@ - + diff --git a/RedGate.AppHost.Client/Program.cs b/RedGate.AppHost.Client/Program.cs index 2fb49c1..5f8b882 100644 --- a/RedGate.AppHost.Client/Program.cs +++ b/RedGate.AppHost.Client/Program.cs @@ -17,9 +17,10 @@ internal static class Program [STAThread] private static void Main(string[] args) { - var options = new Options(); - if (Parser.Default.ParseArguments(args, options)) - { + var parseResult = Parser.Default.ParseArguments(args); + + if (parseResult.Tag == ParserResultType.Parsed) { + var options = parseResult.MapResult(el => el, el => null); #if DEBUG options.Debug = true; #endif diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj index b0591db..31e6dcc 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj @@ -91,7 +91,7 @@ - ..\packages\CommandLineParser.1.9.71\lib\net40\CommandLine.dll + ..\packages\CommandLineParser.2.2.0\lib\net45\CommandLine.dll diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj index ff8e772..ce07128 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj @@ -73,8 +73,8 @@ app.manifest - - ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll + + ..\packages\CommandLineParser.2.2.0\lib\net45\CommandLine.dll True diff --git a/RedGate.AppHost.Client/packages.config b/RedGate.AppHost.Client/packages.config index 0c4d14e..f5e3269 100644 --- a/RedGate.AppHost.Client/packages.config +++ b/RedGate.AppHost.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/RedGate.AppHost.Server/ChildProcessFactory.cs b/RedGate.AppHost.Server/ChildProcessFactory.cs index 919afc8..d3c13fb 100644 --- a/RedGate.AppHost.Server/ChildProcessFactory.cs +++ b/RedGate.AppHost.Server/ChildProcessFactory.cs @@ -4,7 +4,7 @@ public class ChildProcessFactory { public string ClientExecutablePath { get; set; } - public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit, bool monitorHostProcess) { + public IChildProcessHandle Create(string assemblyName, bool openDebugConsole = false, bool is64Bit = false, bool monitorHostProcess = false) { IProcessStartOperation processStarter; if (is64Bit) { @@ -23,22 +23,6 @@ public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bo new StartProcessWithJobSupport( processStarter))).Create(assemblyName, openDebugConsole, monitorHostProcess); } - - // the methods below are to support legacy versions of the API to the Create() method - - public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bool is64Bit) - { - return Create(assemblyName, openDebugConsole, is64Bit, false); - } - - public IChildProcessHandle Create(string assemblyName, bool openDebugConsole) - { - return Create(assemblyName, openDebugConsole, false); - } - - public IChildProcessHandle Create(string assemblyName) - { - return Create(assemblyName, false, false); - } + } } diff --git a/RedGate.AppHost.Server/ChildProcessHandle.cs b/RedGate.AppHost.Server/ChildProcessHandle.cs index f288b60..74a0609 100644 --- a/RedGate.AppHost.Server/ChildProcessHandle.cs +++ b/RedGate.AppHost.Server/ChildProcessHandle.cs @@ -26,10 +26,7 @@ public FrameworkElement CreateElement(IAppHostServices services) } catch (RemotingException) { - if (m_Process != null) - { - m_Process.KillAndDispose(); - } + m_Process?.KillAndDispose(); throw; } } diff --git a/RedGate.AppHost.Server/Native.cs b/RedGate.AppHost.Server/Native.cs index 1ee1ff1..62d4b1b 100644 --- a/RedGate.AppHost.Server/Native.cs +++ b/RedGate.AppHost.Server/Native.cs @@ -14,7 +14,7 @@ internal static void ThrowOnFailure(Func action) if (!ret) { int error = Marshal.GetLastWin32Error(); - throw new ApplicationException(string.Format("ERROR: {0} failed with error code {1}", action.Method, error)); + throw new ApplicationException($"ERROR: {action.Method} failed with error code {error}"); } } diff --git a/RedGate.AppHost.Server/RemotedProcessBootstrapper.cs b/RedGate.AppHost.Server/RemotedProcessBootstrapper.cs index 81c0c1c..11b5341 100644 --- a/RedGate.AppHost.Server/RemotedProcessBootstrapper.cs +++ b/RedGate.AppHost.Server/RemotedProcessBootstrapper.cs @@ -7,7 +7,7 @@ namespace RedGate.AppHost.Server internal class RemotedProcessBootstrapper { private readonly IProcessStartOperation m_ProcessBootstrapper; - private readonly string m_RemotingId = string.Format("RedGate.AppHost.IPC.{{{0}}}", Guid.NewGuid()); + private readonly string m_RemotingId = $"RedGate.AppHost.IPC.{{{Guid.NewGuid()}}}"; public RemotedProcessBootstrapper(IProcessStartOperation processBootstrapper) { @@ -27,8 +27,7 @@ public IChildProcessHandle Create(string assemblyName, bool openDebugConsole, bo } catch { - if (process != null) - process.KillAndDispose(); + process?.KillAndDispose(); throw; } From d8cb3c19b5f553f9b5f1f5922845857078961387 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Thu, 11 Jan 2018 10:59:16 +0100 Subject: [PATCH 07/13] CommandLineParser version update --- RedGate.AppHost.Client/RedGate.AppHost.Client.csproj | 5 +++-- RedGate.AppHost.Client/packages.config | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj index 31e6dcc..c7a5ac2 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj @@ -90,8 +90,9 @@ app.manifest - - ..\packages\CommandLineParser.2.2.0\lib\net45\CommandLine.dll + + ..\packages\CommandLineParser.2.2.1\lib\net45\CommandLine.dll + True diff --git a/RedGate.AppHost.Client/packages.config b/RedGate.AppHost.Client/packages.config index f5e3269..18aa28b 100644 --- a/RedGate.AppHost.Client/packages.config +++ b/RedGate.AppHost.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From fe0db20cfccb5fc37f439ad4348a2c932de33d2b Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Thu, 11 Jan 2018 11:01:16 +0100 Subject: [PATCH 08/13] Fix CommandLineParser reference --- RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj index ce07128..8933c4d 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj @@ -73,8 +73,8 @@ app.manifest - - ..\packages\CommandLineParser.2.2.0\lib\net45\CommandLine.dll + + ..\packages\CommandLineParser.2.2.1\lib\net45\CommandLine.dll True From 1acea336214f321abf0bb6d2fb96107430695cd2 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 14 May 2018 12:07:03 +0200 Subject: [PATCH 09/13] Fix file .nuspec --- NuSpec/RedGate.AppHost.nuspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NuSpec/RedGate.AppHost.nuspec b/NuSpec/RedGate.AppHost.nuspec index ca01d8c..97461c9 100644 --- a/NuSpec/RedGate.AppHost.nuspec +++ b/NuSpec/RedGate.AppHost.nuspec @@ -2,7 +2,7 @@ CefSharp-Remoting.RedGate.AppHost - 1.0.1 + 1.0.2 CefSharp-Remoting fork of Red Gate Out of Process App Host Red Gate Red Gate @@ -16,7 +16,7 @@ - + From 8ba6bc8752b7ff740397b41aaeb709794242ad27 Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 21 Jan 2019 15:37:35 +0100 Subject: [PATCH 10/13] Vs 2017 fix projects --- .gitignore | 1 + RedGate.AppHost.Client/RedGate.AppHost.Client.csproj | 5 ++--- RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bdc3535..b528917 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ Generated_Code #added for RIA/Silverlight projects _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML +/.vs/RedGate.AppHost/v15/Server/sqlite3 diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj index c7a5ac2..85d08cd 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj @@ -13,6 +13,8 @@ 512 false \\red-gate.com\Files\RG_Build_Key\RedGate.snk + false + publish\ true Disk @@ -25,10 +27,8 @@ true 0 1.0.0.%2a - false false true - @@ -92,7 +92,6 @@ ..\packages\CommandLineParser.2.2.1\lib\net45\CommandLine.dll - True diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj index 8933c4d..7467f0c 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj @@ -75,7 +75,6 @@ ..\packages\CommandLineParser.2.2.1\lib\net45\CommandLine.dll - True From f92ea42dbece33e9de98ea05a628c37ecc9e749c Mon Sep 17 00:00:00 2001 From: rupertsciamenna89 Date: Mon, 20 Jul 2020 17:15:02 +0200 Subject: [PATCH 11/13] Aggiunti nomi sicuri --- NuSpec/RedGate.AppHost.nuspec | 2 +- .../RedGate.AppHost.Client.csproj | 5 +++-- .../RedGate.AppHost.Client.x64.csproj | 9 +++++---- RedGate.AppHost.Client/RedGate_AppHost.snk | Bin 0 -> 596 bytes RedGate.AppHost.Client/packages.config | 2 +- .../RedGate.AppHost.Interfaces.csproj | 7 +++++-- RedGate.AppHost.Interfaces/RedGate_AppHost.snk | Bin 0 -> 596 bytes .../RedGate.AppHost.Remoting.WPF.csproj | 7 +++++-- RedGate.AppHost.Remoting.WPF/RedGate_AppHost.snk | Bin 0 -> 596 bytes .../RedGate.AppHost.Remoting.csproj | 7 +++++-- RedGate.AppHost.Remoting/RedGate_AppHost.snk | Bin 0 -> 596 bytes .../RedGate.AppHost.Server.csproj | 7 +++++-- RedGate.AppHost.Server/RedGate_AppHost.snk | Bin 0 -> 596 bytes 13 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 RedGate.AppHost.Client/RedGate_AppHost.snk create mode 100644 RedGate.AppHost.Interfaces/RedGate_AppHost.snk create mode 100644 RedGate.AppHost.Remoting.WPF/RedGate_AppHost.snk create mode 100644 RedGate.AppHost.Remoting/RedGate_AppHost.snk create mode 100644 RedGate.AppHost.Server/RedGate_AppHost.snk diff --git a/NuSpec/RedGate.AppHost.nuspec b/NuSpec/RedGate.AppHost.nuspec index 97461c9..14a19aa 100644 --- a/NuSpec/RedGate.AppHost.nuspec +++ b/NuSpec/RedGate.AppHost.nuspec @@ -2,7 +2,7 @@ CefSharp-Remoting.RedGate.AppHost - 1.0.2 + 1.0.3 CefSharp-Remoting fork of Red Gate Out of Process App Host Red Gate Red Gate diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj index 85d08cd..a7f9f2e 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.csproj @@ -11,8 +11,8 @@ RedGate.AppHost.Client v4.5.2 512 - false - \\red-gate.com\Files\RG_Build_Key\RedGate.snk + true + RedGate_AppHost.snk false publish\ @@ -133,6 +133,7 @@ + diff --git a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj index 7467f0c..cedbf51 100644 --- a/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj +++ b/RedGate.AppHost.Client/RedGate.AppHost.Client.x64.csproj @@ -11,8 +11,8 @@ RedGate.AppHost.Client.x64 v4.5.2 512 - false - \\red-gate.com\Files\RG_Build_Key\RedGate.snk + true + RedGate_AppHost.snk @@ -73,8 +73,8 @@ app.manifest - - ..\packages\CommandLineParser.2.2.1\lib\net45\CommandLine.dll + + ..\packages\CommandLineParser.2.8.0\lib\net45\CommandLine.dll @@ -116,6 +116,7 @@ + diff --git a/RedGate.AppHost.Client/RedGate_AppHost.snk b/RedGate.AppHost.Client/RedGate_AppHost.snk new file mode 100644 index 0000000000000000000000000000000000000000..b5b5d369e234bef00ec2a7a6815a0077b9e63375 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50098ecuGe=6iKzs|DBP)Qd72JqNg0GJ?0R3 zndnbfIR_aimi&7rkJtIvK%e*CkO_-vXi)7dBg$^L-90Bf=&_;<+;9v?AyunX%}E#$ zF23dcge0A3_0%J#N)R|J&CYJpVAUvoGu14>KqbKsY1oXoDoF!d9r9`eJ0Lc)0?6|d zYJgUplY@7os>fO`+);UvHhn3N+;U^I?ZuU;D0SLYl1xORDA8#u2l04>)y&5qnSjWz z6>6g}9hbwqV`BUZu0Ox!N_H4T)3<0Asn;a-QtKh6->6DfNsNcq5bDBs`w0%e&G#2< zx!q$n%}=>=29NflF_wX@-_|nG5k~h{`=_y0z=%^^I>x=RHAYcpgp${&;{9UAmY=U? z|6_){v_hZnimGPHPK9msEe8^%=x0}B!rs@ISE6tP+18t9q?+_~v0opJ2kN}5L&tk8 z*2o`zhv`w+Y9m(ert5RK8`C6+nf#O-#YPMcXX@WtqdTjhCzk!t$v+H=K55cqL0Fdc z7h7RxS%I@ab`v!?aT1q8x~+!d^!24(Rs{ZWnm$x#x-w* zf1=Wr;eG|#cfVY80rvV+0aTb&S9xIP;^CN(-_&;Qf+qZ{VenJykq4=Yv&Yc# z9IwrnS1we)GS^ZGM{$x(wtp>?5QX)LJ# literal 0 HcmV?d00001 diff --git a/RedGate.AppHost.Client/packages.config b/RedGate.AppHost.Client/packages.config index 18aa28b..8ba0218 100644 --- a/RedGate.AppHost.Client/packages.config +++ b/RedGate.AppHost.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj b/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj index 87830dd..f0d320f 100644 --- a/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj +++ b/RedGate.AppHost.Interfaces/RedGate.AppHost.Interfaces.csproj @@ -11,8 +11,8 @@ RedGate.AppHost.Interfaces v4.5.2 512 - false - \\red-gate.com\Files\RG_Build_Key\RedGate.snk + true + RedGate_AppHost.snk @@ -63,6 +63,9 @@ + + +