From 3aa4efc506e5bd4aec28a1bbb67a10f32b95be4b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 10 Mar 2016 08:02:12 -0800 Subject: [PATCH] Use corflags.exe to generate x86 host process This change removes the existing PowerShellEditorServices.Host.x86 project in favor of using the corflags.exe tool to set the 32-bit flag on the AnyCPU build of the host process to generate the x86 variant. This will save some configuration duplication and make x86 host development builds easier to test from editors like Visual Studio Code. Resolves #185. --- PowerShellEditorServices.sln | 9 +- .../PowerShellEditorServices.Host.x86.csproj | 94 ------------------- .../Properties/AssemblyInfo.cs | 43 --------- .../PowerShellEditorServices.Host.csproj | 7 ++ .../PowerShellEditorServices.Host.nuspec | 4 +- 5 files changed, 10 insertions(+), 147 deletions(-) delete mode 100644 src/PowerShellEditorServices.Host.x86/PowerShellEditorServices.Host.x86.csproj delete mode 100644 src/PowerShellEditorServices.Host.x86/Properties/AssemblyInfo.cs diff --git a/PowerShellEditorServices.sln b/PowerShellEditorServices.sln index 44c89bbb5..18efde65c 100644 --- a/PowerShellEditorServices.sln +++ b/PowerShellEditorServices.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F594E7FD-1E72-4E51-A496-B019C2BA3180}" EndProject @@ -39,8 +39,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerShellEditorServices.Pr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerShellEditorServices.Test.Protocol", "test\PowerShellEditorServices.Test.Protocol\PowerShellEditorServices.Test.Protocol.csproj", "{E3A5CF5D-6E41-44AC-AE0A-4C227E4BACD4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerShellEditorServices.Host.x86", "src\PowerShellEditorServices.Host.x86\PowerShellEditorServices.Host.x86.csproj", "{0E720BF8-84E3-4C56-BCEA-7D6FD34D8948}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerShellEditorServices.Channel.WebSocket", "src\PowerShellEditorServices.Channel.WebSocket\PowerShellEditorServices.Channel.WebSocket.csproj", "{A6663F64-3C3D-461F-8A05-0CC4CA7A9945}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PowerShellEditorServices.Test.Channel.WebSocket", "test\PowerShellEditorServices.Test.Channel.WebSocket\PowerShellEditorServices.Test.Channel.WebSocket.csproj", "{9D98120C-9601-4678-AD50-EF2808DABAC9}" @@ -87,10 +85,6 @@ Global {E3A5CF5D-6E41-44AC-AE0A-4C227E4BACD4}.Debug|Any CPU.Build.0 = Debug|Any CPU {E3A5CF5D-6E41-44AC-AE0A-4C227E4BACD4}.Release|Any CPU.ActiveCfg = Release|Any CPU {E3A5CF5D-6E41-44AC-AE0A-4C227E4BACD4}.Release|Any CPU.Build.0 = Release|Any CPU - {0E720BF8-84E3-4C56-BCEA-7D6FD34D8948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E720BF8-84E3-4C56-BCEA-7D6FD34D8948}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E720BF8-84E3-4C56-BCEA-7D6FD34D8948}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E720BF8-84E3-4C56-BCEA-7D6FD34D8948}.Release|Any CPU.Build.0 = Release|Any CPU {A6663F64-3C3D-461F-8A05-0CC4CA7A9945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6663F64-3C3D-461F-8A05-0CC4CA7A9945}.Debug|Any CPU.Build.0 = Debug|Any CPU {A6663F64-3C3D-461F-8A05-0CC4CA7A9945}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -113,7 +107,6 @@ Global {6A20B9E9-DE66-456E-B4F5-ACFD1A95C3CA} = {422E561A-8118-4BE7-A54F-9309E4F03AAE} {F8A0946A-5D25-4651-8079-B8D5776916FB} = {F594E7FD-1E72-4E51-A496-B019C2BA3180} {E3A5CF5D-6E41-44AC-AE0A-4C227E4BACD4} = {422E561A-8118-4BE7-A54F-9309E4F03AAE} - {0E720BF8-84E3-4C56-BCEA-7D6FD34D8948} = {F594E7FD-1E72-4E51-A496-B019C2BA3180} {A6663F64-3C3D-461F-8A05-0CC4CA7A9945} = {F594E7FD-1E72-4E51-A496-B019C2BA3180} {9D98120C-9601-4678-AD50-EF2808DABAC9} = {422E561A-8118-4BE7-A54F-9309E4F03AAE} EndGlobalSection diff --git a/src/PowerShellEditorServices.Host.x86/PowerShellEditorServices.Host.x86.csproj b/src/PowerShellEditorServices.Host.x86/PowerShellEditorServices.Host.x86.csproj deleted file mode 100644 index 1172fa653..000000000 --- a/src/PowerShellEditorServices.Host.x86/PowerShellEditorServices.Host.x86.csproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Debug - AnyCPU - {0E720BF8-84E3-4C56-BCEA-7D6FD34D8948} - Exe - Properties - Microsoft.PowerShell.EditorServices.Host - Microsoft.PowerShell.EditorServices.Host.x86 - v4.5 - 512 - ..\..\ - true - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - Program.cs - - - - - - App.config - - - - - {f4bde3d0-3eef-4157-8a3e-722df7adef60} - ScriptAnalyzerEngine - - - {c33b6b9d-e61c-45a3-9103-895fd82a5c1e} - ScriptAnalyzerBuiltinRules - - - {f8a0946a-5d25-4651-8079-b8d5776916fb} - PowerShellEditorServices.Protocol - - - {81e8cbcd-6319-49e7-9662-0475bd0791f4} - PowerShellEditorServices - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/src/PowerShellEditorServices.Host.x86/Properties/AssemblyInfo.cs b/src/PowerShellEditorServices.Host.x86/Properties/AssemblyInfo.cs deleted file mode 100644 index 97a91864c..000000000 --- a/src/PowerShellEditorServices.Host.x86/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PowerShell Editor Services Host Process")] -[assembly: AssemblyDescription("Provides a process for hosting the PowerShell Editor Services library exposed by a JSON message protocol.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("PowerShell Editor Services")] -[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("22ca7f41-70ac-488f-a98a-30b41327e81d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.0.0.0")] -[assembly: AssemblyInformationalVersion("0.0.0.0")] - diff --git a/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj b/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj index 0b5902535..7426c728c 100644 --- a/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj +++ b/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj @@ -82,6 +82,13 @@ + + + copy /y "$(ProjectDir)bin\$(Configuration)\Microsoft.PowerShell.EditorServices.Host.exe" "$(ProjectDir)bin\$(Configuration)\Microsoft.PowerShell.EditorServices.Host.x86.exe" + copy /y "$(ProjectDir)bin\$(Configuration)\Microsoft.PowerShell.EditorServices.Host.exe.config" "$(ProjectDir)bin\$(Configuration)\Microsoft.PowerShell.EditorServices.Host.x86.exe.config" + "$(TargetFrameworkSDKToolsDirectory)\corflags.exe" "$(ProjectDir)bin\$(Configuration)\Microsoft.PowerShell.EditorServices.Host.x86.exe" /32BIT+ /Force + +