From 943ab5ef7d0e61aa0dface194367ab4b6d5b902d Mon Sep 17 00:00:00 2001 From: Rakesh Ganesh Date: Wed, 6 Mar 2024 21:08:00 +0000 Subject: [PATCH 01/14] MIEngine: Set MajorVersion from the correct place (#1441) * MIEngine: Set MajorVersion from the correct place We were previously setting the MajorGdbVersion when the process exited and this was too late. We need to set this OnStateChanged so we can use this to opt for the latest gdb MI commands. Signed-off-by: intel-rganesh rakesh.ganesh@intel.com * MIEngine: Fix code review comments Try to initialize the gdb version as soon as we add the line to the initialization log. Also, add exception handling when setting major gdb version. Signed-off-by: intel-rganesh rakesh.ganesh@intel.com * MIEngine: Fix code review comments Clear initialization log as before. Signed-off-by: intel-rganesh rakesh.ganesh@intel.com --------- Signed-off-by: intel-rganesh rakesh.ganesh@intel.com --- src/MICore/Debugger.cs | 50 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/MICore/Debugger.cs b/src/MICore/Debugger.cs index c3367de6b..710d6d70c 100755 --- a/src/MICore/Debugger.cs +++ b/src/MICore/Debugger.cs @@ -161,6 +161,8 @@ internal bool IsRequestingInternalAsyncBreak // The key is the thread group, the value is the pid private Dictionary _debuggeePids; + private string _gdbVersion = string.Empty; + public Debugger(LaunchOptions launchOptions, Logger logger) { _launchOptions = launchOptions; @@ -938,6 +940,10 @@ void ITransportCallback.OnStdOutLine(string line) if (_initializationLog != null) { _initializationLog.AddLast(line); + if (string.IsNullOrEmpty(_gdbVersion)) + { + TryInitializeGdbVersion(line); + } } } } @@ -978,24 +984,16 @@ public void OnDebuggerProcessExit(/*OPTIONAL*/ string exitCode) if (_consoleDebuggerInitializeCompletionSource != null) { MIDebuggerInitializeFailedException exception; - string version = GdbVersionFromLog(); - - int majorVersion = -1; - if (!string.IsNullOrWhiteSpace(version)) - { - int.TryParse(version.Split('.').FirstOrDefault(), out majorVersion); - } - MICommandFactory.MajorVersion = majorVersion; - + // We can't use IsMinGW or IsCygwin because we never connected to the debugger bool isMinGWOrCygwin = _launchOptions is LocalLaunchOptions && PlatformUtilities.IsWindows() && this.MICommandFactory.Mode == MIMode.Gdb; - if (isMinGWOrCygwin && version != null && IsUnsupportedWindowsGdbVersion(version)) + if (isMinGWOrCygwin && IsUnsupportedWindowsGdbVersion(_gdbVersion)) { exception = new MIDebuggerInitializeFailedUnsupportedGdbException( - this.MICommandFactory.Name, _initialErrors.ToList().AsReadOnly(), _initializationLog.ToList().AsReadOnly(), version); - SendUnsupportedWindowsGdbEvent(version); + this.MICommandFactory.Name, _initialErrors.ToList().AsReadOnly(), _initializationLog.ToList().AsReadOnly(), _gdbVersion); + SendUnsupportedWindowsGdbEvent(_gdbVersion); } else { @@ -1037,21 +1035,25 @@ public void OnDebuggerProcessExit(/*OPTIONAL*/ string exitCode) } } - string GdbVersionFromLog() - { - foreach (string line in _initializationLog) + void TryInitializeGdbVersion(string line) + { + // Second set of parenthesis looks for a Cygwin-specific version number + // Cygwin example: GNU gdb (GDB) (Cygwin 7.11.1-2) 7.11.1 + // MinGW example: GNU gdb (GDB) 8.0.1 + // Intel GNU gdb example: GNU gdb (Intel(R) Distribution for GDB* 2024.1.0) 14.1 + Match match = Regex.Match(line, + @"GNU gdb(?: \(GDB\))?(?: \(Cygwin (\d+[\.\d-]*)\)| \(Intel\(R\) Distribution for GDB\* [\d.]+\))? ([\d.]+)"); + if (match.Success) { - // Second set of parenthesis looks for a Cygwin-specific version number - // Cygwin example: GNU gdb (GDB) (Cygwin 7.11.1-2) 7.11.1 - // MinGW example: GNU gdb (GDB) 8.0.1 - Match match = Regex.Match(line, "GNU gdb \\(GDB\\) (?:\\(Cygwin (\\d+[\\d\\.-]*)\\) )?(\\d+[\\d\\.-]*)"); - if (match.Success) - { - return match.Groups[1].Success ? match.Groups[1].Value : match.Groups[2].Value; - } + _gdbVersion = match.Groups[1].Success ? match.Groups[1].Value : match.Groups[2].Value; } - return null; + int majorVersion = 0; + if (!string.IsNullOrWhiteSpace(_gdbVersion)) + { + int.TryParse(_gdbVersion.Split('.').FirstOrDefault(), out majorVersion); + } + MICommandFactory.MajorVersion = majorVersion; } bool IsUnsupportedWindowsGdbVersion(string version) From c43ed0457c50a80724312d1fe4730ab6a1522501 Mon Sep 17 00:00:00 2001 From: Rakesh Ganesh Date: Wed, 6 Mar 2024 21:40:07 +0000 Subject: [PATCH 02/14] MIEngine: Add MIDebugCommandDispatcher.ExecuteMICommandWithResultsObject (#1437) This adds a new API, `MIDebugCommandDispatcher.ExecuteMICommandWithResultsObject`, that can be used from another VS extension to invoke an MI API on the underlying debugger and return the results. Authored-by: intel-rganesh rakesh.ganesh@intel.com --- .../Engine.Impl/DebuggedThread.cs | 3 ++ src/MIDebugEngine/MIDebugCommandDispatcher.cs | 37 ++++++++++++++++++- .../source.extension.vsixmanifest | 2 +- .../WindowsDebugLauncher.csproj | 2 +- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/MIDebugEngine/Engine.Impl/DebuggedThread.cs b/src/MIDebugEngine/Engine.Impl/DebuggedThread.cs index ff739b61e..614ef61a9 100644 --- a/src/MIDebugEngine/Engine.Impl/DebuggedThread.cs +++ b/src/MIDebugEngine/Engine.Impl/DebuggedThread.cs @@ -150,6 +150,9 @@ internal async Task> StackFrames(DebuggedThread thread) internal async Task GetThreadContext(DebuggedThread thread) { + if (thread == null) + return null; + lock (_threadList) { if (_topContext.ContainsKey(thread.Id)) diff --git a/src/MIDebugEngine/MIDebugCommandDispatcher.cs b/src/MIDebugEngine/MIDebugCommandDispatcher.cs index 748d6904a..59219905e 100644 --- a/src/MIDebugEngine/MIDebugCommandDispatcher.cs +++ b/src/MIDebugEngine/MIDebugCommandDispatcher.cs @@ -15,7 +15,7 @@ public static class MIDebugCommandDispatcher { private readonly static List s_processes = new List(); - public static Task ExecuteCommand(string command) + private static DebuggedProcess GetLastProcess() { DebuggedProcess lastProcess; lock (s_processes) @@ -27,7 +27,40 @@ public static Task ExecuteCommand(string command) lastProcess = s_processes[s_processes.Count - 1]; } - return ExecuteCommand(command, lastProcess); + + if (lastProcess == null) + { + throw new InvalidOperationException(MICoreResources.Error_NoMIDebuggerProcess); + } + + return lastProcess; + } + + public static MICore.ProcessState GetProcessState() + { + return GetLastProcess().ProcessState; + } + + public static async Task ExecuteMICommandWithResultsObject(string command) + { + if (string.IsNullOrWhiteSpace(command)) + throw new ArgumentNullException(nameof(command)); + + command = command.Trim(); + + if (command[0] == '-') + { + return await GetLastProcess().CmdAsync(command, ResultClass.None); + } + else + { + throw new ArgumentOutOfRangeException(nameof(command)); + } + } + + public static Task ExecuteCommand(string command) + { + return ExecuteCommand(command, GetLastProcess()); } internal static Task ExecuteCommand(string command, DebuggedProcess process, bool ignoreFailures = false) diff --git a/src/MIDebugPackage/source.extension.vsixmanifest b/src/MIDebugPackage/source.extension.vsixmanifest index 3847c9975..b9a1df549 100644 --- a/src/MIDebugPackage/source.extension.vsixmanifest +++ b/src/MIDebugPackage/source.extension.vsixmanifest @@ -5,7 +5,7 @@ Microsoft MI-based Debugger Provides support for connecting Visual Studio to MI compatible debuggers - + diff --git a/src/WindowsDebugLauncher/WindowsDebugLauncher.csproj b/src/WindowsDebugLauncher/WindowsDebugLauncher.csproj index a260ee1fd..7e2e90306 100644 --- a/src/WindowsDebugLauncher/WindowsDebugLauncher.csproj +++ b/src/WindowsDebugLauncher/WindowsDebugLauncher.csproj @@ -13,7 +13,7 @@ Program $(MIDefaultOutputPath)\vscode vscode - net462 + net472 Exe true From 135036df927aefa6206a4a7204cc2b38051bca81 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 19 Mar 2024 15:53:41 -0700 Subject: [PATCH 03/14] Migrate API Scan (#1447) --- eng/pipelines/MIDebugEngine-CI.yml | 4 +++- eng/pipelines/steps/APIScan.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/MIDebugEngine-CI.yml b/eng/pipelines/MIDebugEngine-CI.yml index 3f3bc40f4..5aa99c585 100644 --- a/eng/pipelines/MIDebugEngine-CI.yml +++ b/eng/pipelines/MIDebugEngine-CI.yml @@ -39,8 +39,10 @@ stages: - stage: CodeAnalysis dependsOn: [CI] + variables: + - group: VSEng sponsored APIScan jobs: - - template: ./jobs/MSHosted-Windows.job.yml + - template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml parameters: DisplayName: 'CodeAnalysis' JobTemplate: diff --git a/eng/pipelines/steps/APIScan.yml b/eng/pipelines/steps/APIScan.yml index 4aa947f75..5ae4b69ff 100644 --- a/eng/pipelines/steps/APIScan.yml +++ b/eng/pipelines/steps/APIScan.yml @@ -38,4 +38,4 @@ steps: isLargeApp: false continueOnError: true env: - AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(MIEngineApiScan) \ No newline at end of file + AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId) \ No newline at end of file From 730ead7c42bc2ebc41bae034e8103b855707edf8 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 29 Apr 2024 12:54:09 -0700 Subject: [PATCH 04/14] Build debuggees for CodeAnalysis (#1450) This PR adds in a solution file so the debuggees can be built via the solution file for scans. --- .../templates/CodeAnalysis.template.yml | 6 + test/CppTests/debuggees/sln/README.md | 5 + test/CppTests/debuggees/sln/debuggees.sln | 107 ++++++++++++ .../debuggees/sln/exception/exception.vcxproj | 139 ++++++++++++++++ .../sln/exception/exception.vcxproj.filters | 30 ++++ .../debuggees/sln/hello/hello.vcxproj | 135 ++++++++++++++++ .../debuggees/sln/hello/hello.vcxproj.filters | 22 +++ .../sln/kitchensink/kitchensink.vcxproj | 153 ++++++++++++++++++ .../kitchensink/kitchensink.vcxproj.filters | 72 +++++++++ .../debuggees/sln/natvis/natvis.vcxproj | 143 ++++++++++++++++ .../sln/natvis/natvis.vcxproj.filters | 42 +++++ .../sln/optimization/optimization.vcxproj | 142 ++++++++++++++++ .../optimization/optimization.vcxproj.filters | 39 +++++ .../debuggees/sln/sharedlib/sharedlib.vcxproj | 142 ++++++++++++++++ .../sln/sharedlib/sharedlib.vcxproj.filters | 39 +++++ .../debuggees/sln/sourcemap/sourcemap.vcxproj | 141 ++++++++++++++++ .../sln/sourcemap/sourcemap.vcxproj.filters | 36 +++++ 17 files changed, 1393 insertions(+) create mode 100644 test/CppTests/debuggees/sln/README.md create mode 100644 test/CppTests/debuggees/sln/debuggees.sln create mode 100644 test/CppTests/debuggees/sln/exception/exception.vcxproj create mode 100644 test/CppTests/debuggees/sln/exception/exception.vcxproj.filters create mode 100644 test/CppTests/debuggees/sln/hello/hello.vcxproj create mode 100644 test/CppTests/debuggees/sln/hello/hello.vcxproj.filters create mode 100644 test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj create mode 100644 test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj.filters create mode 100644 test/CppTests/debuggees/sln/natvis/natvis.vcxproj create mode 100644 test/CppTests/debuggees/sln/natvis/natvis.vcxproj.filters create mode 100644 test/CppTests/debuggees/sln/optimization/optimization.vcxproj create mode 100644 test/CppTests/debuggees/sln/optimization/optimization.vcxproj.filters create mode 100644 test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj create mode 100644 test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj.filters create mode 100644 test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj create mode 100644 test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj.filters diff --git a/eng/pipelines/templates/CodeAnalysis.template.yml b/eng/pipelines/templates/CodeAnalysis.template.yml index 84adf530a..7f2e0cee0 100644 --- a/eng/pipelines/templates/CodeAnalysis.template.yml +++ b/eng/pipelines/templates/CodeAnalysis.template.yml @@ -4,6 +4,12 @@ steps: - template: ../tasks/CredScan.yml +- template: ../steps/BuildSolution.yml + parameters: + Solution: '$(Build.SourcesDirectory)\test\CppTests\debuggees\sln\debuggees.sln' + Configuration: 'Debug' + OneESPT: false + - task: DownloadPipelineArtifact@2 displayName: Download Pipeline Artifact inputs: diff --git a/test/CppTests/debuggees/sln/README.md b/test/CppTests/debuggees/sln/README.md new file mode 100644 index 000000000..256be8e14 --- /dev/null +++ b/test/CppTests/debuggees/sln/README.md @@ -0,0 +1,5 @@ +# sln folder for debuggees + +This folder is used for compliance only. +This will build native files with Visual Studio that will be used +to be scanned for CodeQL. \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/debuggees.sln b/test/CppTests/debuggees/sln/debuggees.sln new file mode 100644 index 000000000..36796bce0 --- /dev/null +++ b/test/CppTests/debuggees/sln/debuggees.sln @@ -0,0 +1,107 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello\hello.vcxproj", "{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exception", "exception\exception.vcxproj", "{DACA1CDE-23F8-487E-80AD-3092B08408FA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kitchensink", "kitchensink\kitchensink.vcxproj", "{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "natvis", "natvis\natvis.vcxproj", "{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sharedlib", "sharedlib\sharedlib.vcxproj", "{440C02EE-BE4E-497E-9611-ED2624441EC6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemap", "sourcemap\sourcemap.vcxproj", "{30C2C825-3FA4-45D3-94CD-880FF8001B82}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|Any CPU.ActiveCfg = Debug|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|Any CPU.Build.0 = Debug|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x64.ActiveCfg = Debug|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x64.Build.0 = Debug|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x86.ActiveCfg = Debug|Win32 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x86.Build.0 = Debug|Win32 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|Any CPU.ActiveCfg = Release|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|Any CPU.Build.0 = Release|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x64.ActiveCfg = Release|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x64.Build.0 = Release|x64 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x86.ActiveCfg = Release|Win32 + {6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x86.Build.0 = Release|Win32 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|Any CPU.ActiveCfg = Debug|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|Any CPU.Build.0 = Debug|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x64.ActiveCfg = Debug|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x64.Build.0 = Debug|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x86.ActiveCfg = Debug|Win32 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x86.Build.0 = Debug|Win32 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|Any CPU.ActiveCfg = Release|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|Any CPU.Build.0 = Release|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x64.ActiveCfg = Release|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x64.Build.0 = Release|x64 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x86.ActiveCfg = Release|Win32 + {DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x86.Build.0 = Release|Win32 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|Any CPU.ActiveCfg = Debug|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|Any CPU.Build.0 = Debug|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x64.ActiveCfg = Debug|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x64.Build.0 = Debug|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x86.ActiveCfg = Debug|Win32 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x86.Build.0 = Debug|Win32 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|Any CPU.ActiveCfg = Release|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|Any CPU.Build.0 = Release|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x64.ActiveCfg = Release|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x64.Build.0 = Release|x64 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x86.ActiveCfg = Release|Win32 + {4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x86.Build.0 = Release|Win32 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|Any CPU.Build.0 = Debug|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x64.ActiveCfg = Debug|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x64.Build.0 = Debug|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x86.ActiveCfg = Debug|Win32 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x86.Build.0 = Debug|Win32 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|Any CPU.ActiveCfg = Release|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|Any CPU.Build.0 = Release|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x64.ActiveCfg = Release|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x64.Build.0 = Release|x64 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x86.ActiveCfg = Release|Win32 + {A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x86.Build.0 = Release|Win32 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|Any CPU.ActiveCfg = Debug|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|Any CPU.Build.0 = Debug|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x64.ActiveCfg = Debug|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x64.Build.0 = Debug|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x86.ActiveCfg = Debug|Win32 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x86.Build.0 = Debug|Win32 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|Any CPU.ActiveCfg = Release|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|Any CPU.Build.0 = Release|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x64.ActiveCfg = Release|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x64.Build.0 = Release|x64 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x86.ActiveCfg = Release|Win32 + {440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x86.Build.0 = Release|Win32 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|Any CPU.ActiveCfg = Debug|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|Any CPU.Build.0 = Debug|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x64.ActiveCfg = Debug|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x64.Build.0 = Debug|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x86.ActiveCfg = Debug|Win32 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x86.Build.0 = Debug|Win32 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|Any CPU.ActiveCfg = Release|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|Any CPU.Build.0 = Release|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x64.ActiveCfg = Release|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x64.Build.0 = Release|x64 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x86.ActiveCfg = Release|Win32 + {30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A012557E-A900-406D-A59E-9EFC180EA5BB} + EndGlobalSection +EndGlobal diff --git a/test/CppTests/debuggees/sln/exception/exception.vcxproj b/test/CppTests/debuggees/sln/exception/exception.vcxproj new file mode 100644 index 000000000..b8b5c3471 --- /dev/null +++ b/test/CppTests/debuggees/sln/exception/exception.vcxproj @@ -0,0 +1,139 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {daca1cde-23f8-487e-80ad-3092b08408fa} + exception + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/exception/exception.vcxproj.filters b/test/CppTests/debuggees/sln/exception/exception.vcxproj.filters new file mode 100644 index 000000000..6813a3d76 --- /dev/null +++ b/test/CppTests/debuggees/sln/exception/exception.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/hello/hello.vcxproj b/test/CppTests/debuggees/sln/hello/hello.vcxproj new file mode 100644 index 000000000..dfdbb6689 --- /dev/null +++ b/test/CppTests/debuggees/sln/hello/hello.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6ca48f21-af81-4a33-9bba-0c8132482ff4} + hello + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/hello/hello.vcxproj.filters b/test/CppTests/debuggees/sln/hello/hello.vcxproj.filters new file mode 100644 index 000000000..93834d5a4 --- /dev/null +++ b/test/CppTests/debuggees/sln/hello/hello.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj b/test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj new file mode 100644 index 000000000..9dec8e8e7 --- /dev/null +++ b/test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {4b56db42-cbdf-4d0b-a344-83fdf5b502a6} + kitchensink + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj.filters b/test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj.filters new file mode 100644 index 000000000..93e3b0224 --- /dev/null +++ b/test/CppTests/debuggees/sln/kitchensink/kitchensink.vcxproj.filters @@ -0,0 +1,72 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/natvis/natvis.vcxproj b/test/CppTests/debuggees/sln/natvis/natvis.vcxproj new file mode 100644 index 000000000..d4536f01c --- /dev/null +++ b/test/CppTests/debuggees/sln/natvis/natvis.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {a1eb57c0-004a-41d5-bbf0-9e31b53def7b} + natvis + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/natvis/natvis.vcxproj.filters b/test/CppTests/debuggees/sln/natvis/natvis.vcxproj.filters new file mode 100644 index 000000000..dde4f23eb --- /dev/null +++ b/test/CppTests/debuggees/sln/natvis/natvis.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/optimization/optimization.vcxproj b/test/CppTests/debuggees/sln/optimization/optimization.vcxproj new file mode 100644 index 000000000..95fa6abc5 --- /dev/null +++ b/test/CppTests/debuggees/sln/optimization/optimization.vcxproj @@ -0,0 +1,142 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {d5d9451e-2f5b-471f-8d47-5b64322686dd} + optimization + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/optimization/optimization.vcxproj.filters b/test/CppTests/debuggees/sln/optimization/optimization.vcxproj.filters new file mode 100644 index 000000000..afd235bbf --- /dev/null +++ b/test/CppTests/debuggees/sln/optimization/optimization.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj b/test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj new file mode 100644 index 000000000..3347b9295 --- /dev/null +++ b/test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj @@ -0,0 +1,142 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {440c02ee-be4e-497e-9611-ed2624441ec6} + sharedlib + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj.filters b/test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj.filters new file mode 100644 index 000000000..444b951e3 --- /dev/null +++ b/test/CppTests/debuggees/sln/sharedlib/sharedlib.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj b/test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj new file mode 100644 index 000000000..a96ce0887 --- /dev/null +++ b/test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj @@ -0,0 +1,141 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {30c2c825-3fa4-45d3-94cd-880ff8001b82} + sourcemap + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj.filters b/test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj.filters new file mode 100644 index 000000000..7e475e847 --- /dev/null +++ b/test/CppTests/debuggees/sln/sourcemap/sourcemap.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + \ No newline at end of file From 9d9a171e3d6a30f2c836aefd386a2fff66d21e5c Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 6 May 2024 17:19:47 -0700 Subject: [PATCH 05/14] Pin nightly builds to macOS-12 (#1452) --- .github/workflows/Build-And-Test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build-And-Test.yml b/.github/workflows/Build-And-Test.yml index 73cfff4f4..3fd4729f1 100644 --- a/.github/workflows/Build-And-Test.yml +++ b/.github/workflows/Build-And-Test.yml @@ -150,7 +150,7 @@ jobs: path: ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx osx_build: - runs-on: macos-latest + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v3 @@ -176,4 +176,4 @@ jobs: if: ${{ always() }} with: name: osx_x64_results - path: ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx \ No newline at end of file + path: ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx From 48a9cbe006b782afeb4ccba7f7311df4a0a999f8 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 28 May 2024 14:59:09 -0700 Subject: [PATCH 06/14] Migrate MIEngine to .NET 8 (#1455) --- .github/workflows/Build-And-Test.yml | 8 ++++---- eng/pipelines/tasks/UseDotNet.yml | 2 +- src/OpenDebugAD7/OpenDebugAD7.csproj | 2 +- src/tools/MakePIAPortableTool/MakePIAPortableTool.csproj | 2 +- test/CppTests/CppTests.csproj | 2 +- test/CppTests/CppTests.nuspec | 8 ++++---- test/DebugAdapterRunner/DebugAdapterRunner.nuspec | 4 ++-- test/DebuggerTesting/DebuggerTesting.csproj | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/Build-And-Test.yml b/.github/workflows/Build-And-Test.yml index 3fd4729f1..39e9e12c5 100644 --- a/.github/workflows/Build-And-Test.yml +++ b/.github/workflows/Build-And-Test.yml @@ -29,7 +29,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.1 @@ -61,7 +61,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.1 @@ -119,7 +119,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Build run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln @@ -160,7 +160,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Build run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln diff --git a/eng/pipelines/tasks/UseDotNet.yml b/eng/pipelines/tasks/UseDotNet.yml index 7c13aa7a3..eb4589924 100644 --- a/eng/pipelines/tasks/UseDotNet.yml +++ b/eng/pipelines/tasks/UseDotNet.yml @@ -3,4 +3,4 @@ steps: displayName: 'Use .NET Core sdk' inputs: packageType: sdk - version: 6.x \ No newline at end of file + version: 8.x \ No newline at end of file diff --git a/src/OpenDebugAD7/OpenDebugAD7.csproj b/src/OpenDebugAD7/OpenDebugAD7.csproj index 7f69b31be..2529b0c82 100644 --- a/src/OpenDebugAD7/OpenDebugAD7.csproj +++ b/src/OpenDebugAD7/OpenDebugAD7.csproj @@ -14,7 +14,7 @@ $(MIDefaultOutputPath)\vscode Exe vscode - net6.0 + net8.0 + 6.0.1 + 8.0.4 \ No newline at end of file diff --git a/build/version.settings.targets b/build/version.settings.targets index f606a565b..b4b4aca63 100644 --- a/build/version.settings.targets +++ b/build/version.settings.targets @@ -3,7 +3,7 @@ 17 - 8 + 12 2022 diff --git a/src/DebugEngineHost/DebugEngineHost.csproj b/src/DebugEngineHost/DebugEngineHost.csproj index 03bd58c69..bed223019 100755 --- a/src/DebugEngineHost/DebugEngineHost.csproj +++ b/src/DebugEngineHost/DebugEngineHost.csproj @@ -88,6 +88,13 @@ compile all + + + all + + + all + diff --git a/src/MIDebugPackage/MIDebugPackage.csproj b/src/MIDebugPackage/MIDebugPackage.csproj index fe7a3a4ad..c07e0a335 100755 --- a/src/MIDebugPackage/MIDebugPackage.csproj +++ b/src/MIDebugPackage/MIDebugPackage.csproj @@ -53,6 +53,13 @@ + + + all + + + all + diff --git a/src/SSHDebugPS/SSHDebugPS.csproj b/src/SSHDebugPS/SSHDebugPS.csproj index f270e64e6..dd99dd6e1 100644 --- a/src/SSHDebugPS/SSHDebugPS.csproj +++ b/src/SSHDebugPS/SSHDebugPS.csproj @@ -28,6 +28,13 @@ + + + all + + + all + From 61b1593bb7891c74ee19e269c3ca171e3cb42928 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 6 Sep 2024 10:57:41 -0700 Subject: [PATCH 11/14] Sign VS Insertion Nuget Packages (#1466) This PR removes the external YAML steps to create nuget packages and injects it into the solution build process if its on the CI. --- MIEngine.UnixPortSupplier.nuspec | 4 +- MIEngine.mdd.nuspec | 10 ++--- .../steps/PackAndPublishVSPackages.yml | 39 ------------------- eng/pipelines/steps/PublishVSPackages.yml | 18 +++++++++ .../templates/VS-release.template.yml | 5 ++- src/MIDebugPackage/MIDebugPackage.csproj | 5 +++ src/SSHDebugPS/SSHDebugPS.csproj | 6 +++ 7 files changed, 40 insertions(+), 47 deletions(-) delete mode 100644 eng/pipelines/steps/PackAndPublishVSPackages.yml create mode 100644 eng/pipelines/steps/PublishVSPackages.yml diff --git a/MIEngine.UnixPortSupplier.nuspec b/MIEngine.UnixPortSupplier.nuspec index fae9ff2d3..be725dfcd 100644 --- a/MIEngine.UnixPortSupplier.nuspec +++ b/MIEngine.UnixPortSupplier.nuspec @@ -12,7 +12,7 @@ - - + + diff --git a/MIEngine.mdd.nuspec b/MIEngine.mdd.nuspec index 883cab2ad..051d4a5bf 100644 --- a/MIEngine.mdd.nuspec +++ b/MIEngine.mdd.nuspec @@ -12,10 +12,10 @@ - - - - - + + + + + diff --git a/eng/pipelines/steps/PackAndPublishVSPackages.yml b/eng/pipelines/steps/PackAndPublishVSPackages.yml deleted file mode 100644 index fd95d189e..000000000 --- a/eng/pipelines/steps/PackAndPublishVSPackages.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Pack and Publish NuGet Packages for VS -# Creates: -# - VS.Redist.Debugger.MDD.MIEngine -# - VS.Redist.Debugger.MDD.UnixPortSupplier ---- -parameters: - BasePath: $(Build.StagingDirectory) - -steps: -- script: | - for /f "delims=" %%f in ($(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt) do set NugetPackageVersion=%%f - echo ##vso[task.setvariable variable=NugetPackageVersion;]%NugetPackageVersion% - displayName: 'Get NuGet Version' - -- template: ../tasks/1ES/PublishPipelineArtifact.yml - parameters: - displayName: 'Publish File Version' - targetPath: '$(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt' - artifactName: 'PackageVersion' - OneESPT: true - -- template: ../tasks/NuGetCommand.yml - parameters: - displayName: 'NuGet pack' - command: pack - searchPatternPack: '$(Build.SourcesDirectory)\MIEngine.mdd.nuspec;$(Build.SourcesDirectory)\MIEngine.UnixPortSupplier.nuspec' - configurationToPack: Release - buildProperties: 'version=$(NugetPackageVersion)' - basePath: ${{ parameters.BasePath }} - -- task: 1ES.PublishNuget@1 - displayName: Publish Nuget package - condition: and(succeeded(), eq(variables['SignType'], 'real')) - inputs: - packagesToPush: '$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.MIEngine.*.nupkg;$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.UnixPortSupplier.*.nupkg' - packageParentPath: '$(Build.SourcesDirectory)' - publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010' # VS - nuGetFeedType: internal -... \ No newline at end of file diff --git a/eng/pipelines/steps/PublishVSPackages.yml b/eng/pipelines/steps/PublishVSPackages.yml new file mode 100644 index 000000000..33ec76358 --- /dev/null +++ b/eng/pipelines/steps/PublishVSPackages.yml @@ -0,0 +1,18 @@ +# Pack and Publish NuGet Packages for VS +# Creates: +# - VS.Redist.Debugger.MDD.MIEngine +# - VS.Redist.Debugger.MDD.UnixPortSupplier +--- +parameters: + BasePath: $(Build.StagingDirectory) + +steps: +- task: 1ES.PublishNuget@1 + displayName: Publish Nuget package + condition: and(succeeded(), eq(variables['SignType'], 'real')) + inputs: + packagesToPush: '$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.MIEngine.*.nupkg;$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.UnixPortSupplier.*.nupkg' + packageParentPath: '$(Build.SourcesDirectory)' + publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010' # VS + nuGetFeedType: internal +... \ No newline at end of file diff --git a/eng/pipelines/templates/VS-release.template.yml b/eng/pipelines/templates/VS-release.template.yml index 352fa49ae..9a5b1b972 100644 --- a/eng/pipelines/templates/VS-release.template.yml +++ b/eng/pipelines/templates/VS-release.template.yml @@ -6,9 +6,12 @@ steps: - template: ../tasks/NuGetToolInstaller.yml +- template: ../tasks/MicroBuildSigningPlugin.yml + - template: ../steps/BuildSolution.yml parameters: Configuration: 'Lab.Release' + BuildArguments: /p:NuGetPath=$(NuGetExeToolPath) /p:NuGetPrerelease=false OneESPT: true - template: ../steps/CollectAndPublishBinaries.yml @@ -25,7 +28,7 @@ steps: parameters: OneESPT: true -- template: ../steps/PackAndPublishVSPackages.yml +- template: ../steps/PublishVSPackages.yml parameters: BasePath: $(Build.StagingDirectory) diff --git a/src/MIDebugPackage/MIDebugPackage.csproj b/src/MIDebugPackage/MIDebugPackage.csproj index c07e0a335..8e136cb13 100755 --- a/src/MIDebugPackage/MIDebugPackage.csproj +++ b/src/MIDebugPackage/MIDebugPackage.csproj @@ -221,6 +221,11 @@ + + + + + diff --git a/src/SSHDebugPS/SSHDebugPS.csproj b/src/SSHDebugPS/SSHDebugPS.csproj index dd99dd6e1..df00c43df 100644 --- a/src/SSHDebugPS/SSHDebugPS.csproj +++ b/src/SSHDebugPS/SSHDebugPS.csproj @@ -90,6 +90,11 @@ + + + + + True @@ -104,4 +109,5 @@ + \ No newline at end of file From 1c0b682f7a3af9aa109ab732e16ce136f020bf97 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 6 Sep 2024 14:01:20 -0700 Subject: [PATCH 12/14] Move UnixPortSupplierInterop NuGet Sign (#1468) * Move UnixPortSupplierInterop NuGet Sign * Remove UnixPortSupplier NuGet from SSHDebugPS * Also need version file for insertion --- MIEngine.UnixPortSupplier.nuspec | 4 ++-- eng/pipelines/steps/PublishVSPackages.yml | 12 ++++++++++++ ...bugger.Interop.UnixPortSupplier.DesignTime.csproj | 5 +++++ src/SSHDebugPS/SSHDebugPS.csproj | 5 ----- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/MIEngine.UnixPortSupplier.nuspec b/MIEngine.UnixPortSupplier.nuspec index be725dfcd..3610c6d97 100644 --- a/MIEngine.UnixPortSupplier.nuspec +++ b/MIEngine.UnixPortSupplier.nuspec @@ -12,7 +12,7 @@ - - + + diff --git a/eng/pipelines/steps/PublishVSPackages.yml b/eng/pipelines/steps/PublishVSPackages.yml index 33ec76358..6c6c33ec6 100644 --- a/eng/pipelines/steps/PublishVSPackages.yml +++ b/eng/pipelines/steps/PublishVSPackages.yml @@ -7,6 +7,18 @@ parameters: BasePath: $(Build.StagingDirectory) steps: +- script: | + for /f "delims=" %%f in ($(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt) do set NugetPackageVersion=%%f + echo ##vso[task.setvariable variable=NugetPackageVersion;]%NugetPackageVersion% + displayName: 'Get NuGet Version' + +- template: ../tasks/1ES/PublishPipelineArtifact.yml + parameters: + displayName: 'Publish File Version' + targetPath: '$(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt' + artifactName: 'PackageVersion' + OneESPT: true + - task: 1ES.PublishNuget@1 displayName: Publish Nuget package condition: and(succeeded(), eq(variables['SignType'], 'real')) diff --git a/src/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier.DesignTime.csproj b/src/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier.DesignTime.csproj index 120f75c33..c781de505 100644 --- a/src/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier.DesignTime.csproj +++ b/src/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier/Microsoft.VisualStudio.Debugger.Interop.UnixPortSupplier.DesignTime.csproj @@ -35,6 +35,11 @@ + + + + + diff --git a/src/SSHDebugPS/SSHDebugPS.csproj b/src/SSHDebugPS/SSHDebugPS.csproj index df00c43df..3851f8955 100644 --- a/src/SSHDebugPS/SSHDebugPS.csproj +++ b/src/SSHDebugPS/SSHDebugPS.csproj @@ -90,11 +90,6 @@ - - - - - True From 6ae474c09b07e3e4469a31df06435dd048774830 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 9 Sep 2024 09:06:34 -0700 Subject: [PATCH 13/14] Copy NuGet Packages and push to Feed (#1470) This PR fixes the issue where packages are not being published and copies it to a specific folder before uploading --- eng/pipelines/steps/PublishVSPackages.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/steps/PublishVSPackages.yml b/eng/pipelines/steps/PublishVSPackages.yml index 6c6c33ec6..2308737b5 100644 --- a/eng/pipelines/steps/PublishVSPackages.yml +++ b/eng/pipelines/steps/PublishVSPackages.yml @@ -18,13 +18,21 @@ steps: targetPath: '$(Build.SourcesDirectory)\obj\Lab.Release\NugetPackageVersion.txt' artifactName: 'PackageVersion' OneESPT: true - + +- task: CopyFiles@2 + inputs: + SourceFolder: $(Build.BinariesDirectory) + Contents: '**/*.nupkg' + TargetFolder: $(Build.SourcesDirectory)/NugetPackages + flattenFolders: true + OverWrite: true + - task: 1ES.PublishNuget@1 displayName: Publish Nuget package condition: and(succeeded(), eq(variables['SignType'], 'real')) inputs: - packagesToPush: '$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.MIEngine.*.nupkg;$(Build.SourcesDirectory)\VS.Redist.Debugger.MDD.UnixPortSupplier.*.nupkg' - packageParentPath: '$(Build.SourcesDirectory)' + packagesToPush: '$(Build.SourcesDirectory)/NugetPackages/*.nupkg' + packageParentPath: '$(Build.SourcesDirectory)/NugetPackages' publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010' # VS nuGetFeedType: internal ... \ No newline at end of file From 15173ad071d01177efe878dce822cd35abafff76 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 13 Sep 2024 11:31:22 -0700 Subject: [PATCH 14/14] Archive drop folder and dont publish Symbol Folder (#1472) --- eng/pipelines/steps/CopyAndPublishSymbols.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/eng/pipelines/steps/CopyAndPublishSymbols.yml b/eng/pipelines/steps/CopyAndPublishSymbols.yml index 521f89468..1788f9695 100644 --- a/eng/pipelines/steps/CopyAndPublishSymbols.yml +++ b/eng/pipelines/steps/CopyAndPublishSymbols.yml @@ -7,8 +7,8 @@ steps: - template: ../tasks/CopyFiles.yml parameters: displayName: 'Collect build symbols' - SourceFolder: '$(Build.SourcesDirectory)' - Contents: '$(Build.SourcesDirectory)\bin\**\*.+(pdb|exe|dll)' + SourceFolder: '$(Build.StagingDirectory)\drop' + Contents: '$(Build.StagingDirectory)\drop\**\*.+(pdb|exe|dll)' TargetFolder: '$(Build.ArtifactStagingDirectory)/symbols' CleanTargetFolder: true @@ -19,16 +19,9 @@ steps: SymbolsFeatureName: MIEngine SymbolsProject: VS SymbolsAgentPath: '$(Build.ArtifactStagingDirectory)\Symbols\' - ExcludeAgentFolders: '$(Build.ArtifactStagingDirectory)\Symbols\bin\Debug;$(Build.ArtifactStagingDirectory)\Symbols\bin\Lab.Debug' + ExcludeAgentFolders: '$(Build.ArtifactStagingDirectory)\Symbols\Debug;$(Build.ArtifactStagingDirectory)\Symbols\Lab.Debug' ${{ if parameters.OneESPT }}: ExpirationInDays: 3650 # Expire in 10 years for release builds ${{ else }}: ExpirationInDays: 1 # Expire in 1 day if used for testing - -- template: ../tasks/1ES/PublishPipelineArtifact.yml - parameters: - displayName: 'Publish Symbols Artifact' - targetPath: '$(Build.ArtifactStagingDirectory)/symbols' - artifactName: 'Symbols' - OneESPT: ${{ parameters.OneESPT }} ... \ No newline at end of file