From a632c2385bed549dc490623a6e697fd6408aa111 Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Tue, 26 Oct 2021 16:00:24 -0700 Subject: [PATCH 01/15] Enhance sourecFileMap documentation (#4844) The documentation for `sourceFileMap` was not very through. This tries to make things more clear. --- debugger-launchjson.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debugger-launchjson.md b/debugger-launchjson.md index b4d912b5e..fe5b1ec04 100644 --- a/debugger-launchjson.md +++ b/debugger-launchjson.md @@ -136,12 +136,17 @@ The `"console"` setting controls what console (terminal) window the target app i `"externalTerminal"`: the target process will run inside its own external terminal. ## Source File Map -You can optionally configure a file by file mapping by providing map following this schema: +You can optionally configure how source files are opened by providing a map using this form: "sourceFileMap": { "C:\\foo":"/home/me/foo" } +In this example: +* `C:\foo` is the original location for one or more source files (example: `program.cs`) when a module (example: MyCode.dll) was compiled. It can either be a directory that has source files under it, or a complete path to a source file (example: `c:\foo\program.cs`). It doesn't need to exist either on the computer running Visual Studio Code, or if you are remote debugging, on the remote machine. The debugger will read the path to the source file from the .pdb (symbol) file, and it will transform it using this map. +* `/home/me/foo` is the path where the source file can now be found by Visual Studio Code. + + ## Just My Code You can optionally disable `justMyCode` by setting it to "false". You should disable Just My Code when you are trying to debug into a library that you pulled down which doesn't have symbols or is optimized. From 1300a755cd67bd19a85355991f29ffaf14d127b9 Mon Sep 17 00:00:00 2001 From: Darlisha Campbell <40171398+DarCampbell@users.noreply.github.com> Date: Wed, 27 Oct 2021 10:25:18 -0400 Subject: [PATCH 02/15] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9beb85890..0396e2467 100644 --- a/package.json +++ b/package.json @@ -3212,7 +3212,7 @@ "browser": { "type": "string", "description": "The debugging browser to launch (Edge or Chrome)", - "default": "chrome", + "default": "edge", "enum": [ "chrome", "edge" @@ -3750,4 +3750,4 @@ } ] } -} \ No newline at end of file +} From 38694315b59e997c3f23cf47aa508cbc9bdb493f Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 27 Oct 2021 14:53:33 -0700 Subject: [PATCH 03/15] Add `CimAttachItemsProvider` to replace `WmicAttachItemsProvider` (#4848) * Add CimAttachItemsProvider Add CimAttachItemsProvider to retrieve processes with Get-CimInstance Win32_Process if powershell is found in PATH. From https://github.com/microsoft/vscode-cpptools/pull/8329 * Address PR issues --- src/common.ts | 21 ++++++++++ src/features/processPicker.ts | 44 ++++++++++++++++++-- test/featureTests/processPicker.test.ts | 54 ++++++++++++++++++++++++- 3 files changed, 115 insertions(+), 4 deletions(-) diff --git a/src/common.ts b/src/common.ts index f46eca015..b3fd90247 100644 --- a/src/common.ts +++ b/src/common.ts @@ -209,3 +209,24 @@ export function isSubfolderOf(subfolder: string, folder: string): boolean { // Check to see that every sub directory in subfolder exists in folder. return subfolderArray.length <= folderArray.length && subfolderArray.every((subpath, index) => folderArray[index] === subpath); } + +/** + * Find PowerShell executable from PATH (for Windows only). + */ + export function findPowerShell(): string | undefined { + const dirs: string[] = (process.env.PATH || '').replace(/"+/g, '').split(';').filter(x => x); + const names: string[] = ['pwsh.exe', 'powershell.exe']; + for (const name of names) { + const candidates: string[] = dirs.reduce((paths, dir) => [ + ...paths, path.join(dir, name) + ], []); + for (const candidate of candidates) { + try { + if (fs.statSync(candidate).isFile()) { + return name; + } + } catch (e) { + } + } + } +} \ No newline at end of file diff --git a/src/features/processPicker.ts b/src/features/processPicker.ts index 900efe37b..e7e77b738 100644 --- a/src/features/processPicker.ts +++ b/src/features/processPicker.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { PlatformInformation } from '../platform'; -import { getExtensionPath } from '../common'; +import { findPowerShell, getExtensionPath } from '../common'; export interface AttachItem extends vscode.QuickPickItem { id: string; @@ -265,7 +265,7 @@ export class RemoteAttachPicker { } } -class Process { +export class Process { constructor(public name: string, public pid: string, public commandLine: string, public flags: number) { } public toAttachItem(): AttachItem { @@ -282,7 +282,8 @@ class Process { export class DotNetAttachItemsProviderFactory { static Get(): AttachItemsProvider { if (os.platform() === 'win32') { - return new WmicAttachItemsProvider(); + const pwsh: string | undefined = findPowerShell(); + return pwsh ? new CimAttachItemsProvider(pwsh) : new WmicAttachItemsProvider(); } else { return new PsAttachItemsProvider(); @@ -423,6 +424,43 @@ export class PsOutputParser { } } +export class CimAttachItemsProvider extends DotNetAttachItemsProvider { + constructor(private pwsh: string) { super(); } + + protected async getInternalProcessEntries(): Promise { + const pwshCommand: string = `${this.pwsh} -NoProfile -Command`; + const cimCommand: string = 'Get-CimInstance Win32_Process | Select-Object Name,ProcessId,CommandLine | ConvertTo-JSON'; + const processes: string = await execChildProcess(`${pwshCommand} "${cimCommand}"`, undefined); + return CimProcessParser.ParseProcessFromCim(processes); + } +} + +type CimProcessInfo = { + Name: string; + ProcessId: number; + CommandLine: string | null; +}; + +export class CimProcessParser { + private static get extendedLengthPathPrefix(): string { return '\\\\?\\'; } + private static get ntObjectManagerPathPrefix(): string { return '\\??\\'; } + + // Only public for tests. + public static ParseProcessFromCim(processes: string): Process[] { + const processInfos: CimProcessInfo[] = JSON.parse(processes); + return processInfos.map(info => { + let cmdline: string | undefined = info.CommandLine || undefined; + if (cmdline?.startsWith(this.extendedLengthPathPrefix)) { + cmdline = cmdline.slice(this.extendedLengthPathPrefix.length); + } + if (cmdline?.startsWith(this.ntObjectManagerPathPrefix)) { + cmdline = cmdline.slice(this.ntObjectManagerPathPrefix.length); + } + return new Process(info.Name, `${info.ProcessId}`, cmdline, null); + }); + } +} + export class WmicAttachItemsProvider extends DotNetAttachItemsProvider { protected async getInternalProcessEntries(): Promise { const wmicCommand = 'wmic process get Name,ProcessId,CommandLine /FORMAT:list'; diff --git a/test/featureTests/processPicker.test.ts b/test/featureTests/processPicker.test.ts index c5ab57d43..24cb59f8f 100644 --- a/test/featureTests/processPicker.test.ts +++ b/test/featureTests/processPicker.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { RemoteAttachPicker } from '../../src/features/processPicker'; +import { RemoteAttachPicker, Process, CimProcessParser } from '../../src/features/processPicker'; import { should } from 'chai'; suite("Remote Process Picker: Validate quoting arguments.", () => { @@ -157,6 +157,58 @@ suite("Remote Process Picker: Validate quoting arguments.", () => { pipeTransport.pipeArgs.should.deep.equal([]); }); + + test('Parse valid CIM output', () => { + // output from the command used in CimAttachItemsProvider + const cimOutput: string = String.raw`[ + { + "Name": "System Idle Process", + "ProcessId": 0, + "CommandLine": null + }, + { + "Name": "WindowsTerminal.exe", + "ProcessId": 5112, + "CommandLine": "\"C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_1.12.2931.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe\"" + }, + { + "Name": "conhost.exe", + "ProcessId": 34560, + "CommandLine": "\\\\?\\C:\\WINDOWS\\system32\\conhost.exe --headless --width 80 --height 30 --signal 0x8e0 --server 0x824" + }, + { + "Name": "conhost.exe", + "ProcessId": 33732, + "CommandLine": "\\??\\C:\\WINDOWS\\system32\\conhost.exe 0x4" + } +]`; + + const parsedOutput: Process[] = CimProcessParser.ParseProcessFromCim(cimOutput); + + parsedOutput.length.should.equal(4); + + const process1: Process = parsedOutput[0]; + const process2: Process = parsedOutput[1]; + const process3: Process = parsedOutput[2]; + const process4: Process = parsedOutput[3]; + + var should = require('chai').should(); + should.not.exist(process1.commandLine); + process1.name.should.equal('System Idle Process'); + process1.pid.should.equal('0'); + + process2.commandLine.should.equal('"C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_1.12.2931.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"'); + process2.name.should.equal('WindowsTerminal.exe'); + process2.pid.should.equal('5112'); + + process3.commandLine.should.equal('C:\\WINDOWS\\system32\\conhost.exe --headless --width 80 --height 30 --signal 0x8e0 --server 0x824'); + process3.name.should.equal('conhost.exe'); + process3.pid.should.equal('34560'); + + process4.commandLine.should.equal('C:\\WINDOWS\\system32\\conhost.exe 0x4'); + process4.name.should.equal('conhost.exe'); + process4.pid.should.equal('33732'); + }); }); function GetWindowsWSLLaunchJSONWithArrayArgs() { From 08e03476f439823e44938a5153c44e14d3c63dc5 Mon Sep 17 00:00:00 2001 From: heartacker Date: Thu, 28 Oct 2021 23:08:55 +0800 Subject: [PATCH 04/15] new snippest for c# to disable code block format just like //clang-format off/on --- snippets/csharp.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/snippets/csharp.json b/snippets/csharp.json index e16716087..7f864a30c 100644 --- a/snippets/csharp.json +++ b/snippets/csharp.json @@ -29,6 +29,15 @@ ], "description": "Attribute using recommended pattern" }, + "Disable format": { + "prefix": "disableformat", + "body": [ + "#pragma warning disable format", + "$0${TM_SELECTED_TEXT}", + "#pragma warning restore format" + ], + "description": "disable format of dotnet code" + }, "Checked block": { "prefix": "checked", "body": [ From 7157bbcdc592e9d72461da67b24f42ccda3e2702 Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Thu, 28 Oct 2021 10:56:08 -0700 Subject: [PATCH 05/15] Produce platform target to platform-specific .vsix's (#4850) This PR is hopefully the penultimate step before the C# extension can switch to pushing platform specific .vsix's to the gallery. With this PR we are adding the `--target` argument when calling vsce. --- package.json | 4 ++-- tasks/offlinePackagingTasks.ts | 5 +++++ tasks/projectPaths.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0396e2467..67191b92c 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "tslint-no-unused-expression-chai": "0.1.4", "typescript": "4.2.4", "unzipper": "0.10.11", - "vsce": "1.57.0", + "vsce": "1.100.2", "vscode-test": "1.5.2", "webpack": "5.34.0", "webpack-cli": "4.6.0" @@ -398,7 +398,7 @@ } ], "engines": { - "vscode": "^1.58.0" + "vscode": "^1.61.0" }, "activationEvents": [ "onDebugInitialConfigurations", diff --git a/tasks/offlinePackagingTasks.ts b/tasks/offlinePackagingTasks.ts index 453eec368..0bdb10a35 100644 --- a/tasks/offlinePackagingTasks.ts +++ b/tasks/offlinePackagingTasks.ts @@ -131,6 +131,11 @@ async function createPackageAsync(packageName: string, outputFolder: string, vsc else { vsceArgs.push(packageName); } + + if (vscodePlatformId !== undefined) { + vsceArgs.push("--target"); + vsceArgs.push(vscodePlatformId); + } } const spawnResult = await spawnNode(vsceArgs); diff --git a/tasks/projectPaths.ts b/tasks/projectPaths.ts index 5641af70d..7d85a4014 100644 --- a/tasks/projectPaths.ts +++ b/tasks/projectPaths.ts @@ -13,7 +13,7 @@ export const offlineVscodeignorePath = path.join(rootPath, 'offline.vscodeignore export const onlineVscodeignorePath = path.join(rootPath, 'release.vscodeignore'); export const nodeModulesPath = path.join(rootPath, 'node_modules'); -export const vscePath = path.join(nodeModulesPath, 'vsce', 'out', 'vsce'); +export const vscePath = path.join(nodeModulesPath, 'vsce', 'vsce'); export const mochaPath = path.join(nodeModulesPath, 'mocha', 'bin', 'mocha'); export const packageJsonPath = path.join(rootPath, "package.json"); From b43193c31ecf1457c7a3d0e14e2913261fd0c1eb Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Thu, 28 Oct 2021 15:01:45 -0700 Subject: [PATCH 06/15] Change official builds to use platform-specific VSIXs (#4852) This PR hopefully completes the work to switch to platform-specific VSIXs. This renames the gulp tasks to give better names and changes the official builds to use the new tasks. --- .github/workflows/ci.yml | 7 +++- .github/workflows/release-ci.yml | 63 ++++++++++++++++++++++++++++++-- tasks/backcompatTasks.ts | 3 +- tasks/offlinePackagingTasks.ts | 2 +- tasks/onlinePackagingTasks.ts | 2 +- 5 files changed, 68 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 957bb6949..fbba3db9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,8 +35,8 @@ jobs: - name: Compile run: npm run compile - - name: Build extension package - run: gulp 'vsix:release:package' + - name: Build platform-neutral extension package + run: gulp 'vsix:release:package:platform-neutral' - name: Run unit and integration tests run: | @@ -45,3 +45,6 @@ jobs: env: CODE_VERSION: 1.45.0 DISPLAY: :99.0 + + - name: Build platform-specific extension package + run: gulp 'vsix:release:package:platform-specific' \ No newline at end of file diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index dcac94929..e5eb9dd50 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -22,7 +22,7 @@ jobs: npm i -g gulp - name: Build extension package - run: gulp 'vsix:release:package' + run: gulp 'vsix:release:package:platform-specific' - name: Run release tests run: npm run test:release @@ -30,13 +30,68 @@ jobs: - name: Get package version run: node -e "console.log('VERSION=' + require('./package.json').version)" >> $GITHUB_ENV - - name: Upload release build + - name: Upload release build (darwin-arm64) id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}.vsix - asset_name: csharp-${{ env.VERSION }}.vsix + asset_path: ./csharp-${{ env.VERSION }}-(darwin-arm64).vsix + asset_name: csharp-${{ env.VERSION }}-(darwin-arm64).vsix + asset_content_type: application/zip + + - name: Upload release build (darwin-x64) + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./csharp-${{ env.VERSION }}-(darwin-x64).vsix + asset_name: csharp-${{ env.VERSION }}-(darwin-x64).vsix + asset_content_type: application/zip + + - name: Upload release build (linux-x64) + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./csharp-${{ env.VERSION }}-(linux-x64).vsix + asset_name: csharp-${{ env.VERSION }}-(linux-x64).vsix + asset_content_type: application/zip + + - name: Upload release build (win32-arm64) + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./csharp-${{ env.VERSION }}-(win32-arm64).vsix + asset_name: csharp-${{ env.VERSION }}-(win32-arm64).vsix + asset_content_type: application/zip + + - name: Upload release build (win32-ia32) + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./csharp-${{ env.VERSION }}-(win32-ia32).vsix + asset_name: csharp-${{ env.VERSION }}-(win32-ia32).vsix + asset_content_type: application/zip + + - name: Upload release build (win32-x64) + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./csharp-${{ env.VERSION }}-(win32-x64).vsix + asset_name: csharp-${{ env.VERSION }}-(win32-x64).vsix asset_content_type: application/zip diff --git a/tasks/backcompatTasks.ts b/tasks/backcompatTasks.ts index dd38d1c35..9d33b0e4f 100644 --- a/tasks/backcompatTasks.ts +++ b/tasks/backcompatTasks.ts @@ -5,4 +5,5 @@ import * as gulp from 'gulp'; -gulp.task('package:offline', gulp.series('vsix:offline:package')); \ No newline at end of file +gulp.task('package:offline', gulp.series('vsix:release:package:platform-specific')); +gulp.task('vsix:offline:package', gulp.series('vsix:release:package:platform-specific')); \ No newline at end of file diff --git a/tasks/offlinePackagingTasks.ts b/tasks/offlinePackagingTasks.ts index 0bdb10a35..9ca0fb8a0 100644 --- a/tasks/offlinePackagingTasks.ts +++ b/tasks/offlinePackagingTasks.ts @@ -38,7 +38,7 @@ export function getPackageName(packageJSON: any, vscodePlatformId: string) { return `${name}.${version}-${vscodePlatformId}.vsix`; } -gulp.task('vsix:offline:package', async () => { +gulp.task('vsix:release:package:platform-specific', async () => { if (process.platform === 'win32') { throw new Error('Do not build offline packages on windows. Runtime executables will not be marked executable in *nix packages.'); diff --git a/tasks/onlinePackagingTasks.ts b/tasks/onlinePackagingTasks.ts index 0efb73316..8fb08d98a 100644 --- a/tasks/onlinePackagingTasks.ts +++ b/tasks/onlinePackagingTasks.ts @@ -21,7 +21,7 @@ gulp.task('vsix:release:unpackage', () => { return fs.createReadStream(packageName).pipe(Extract({ path: unpackedVsixPath })); }); -gulp.task('vsix:release:package', async (onError) => { +gulp.task('vsix:release:package:platform-neutral', async (onError) => { del.sync(vscodeignorePath); fs.copyFileSync(onlineVscodeignorePath, vscodeignorePath); From 66b4210c5572b32670999edbf823b598e553b266 Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Thu, 28 Oct 2021 15:33:08 -0700 Subject: [PATCH 07/15] Update debugger to 1.23.17 (#4855) This PR updates the debugger to 1.23.17. This includes: * All the bug fixes that went into Visual Studio 17 GA * Updating the debugger to run on .NET 6 RC2 * Enhanced support for launchSettings.json ([#3121](https://github.com/OmniSharp/omnisharp-vscode/issues/3121)) * Now that most users will not need to download the debugger themselves (it comes pre-packaged in a platform specific .vsix), this changes back to the Azure CDN instead of https://download.visualstudio.microsoft.com This also updates `gulp updatePackageDependencies` to support updating packages when the primary URL just has a simple version number. --- CHANGELOG.md | 5 + debugger-launchjson.md | 37 ++++++-- package.json | 61 +++++++----- src/tools/OptionsSchema.json | 12 +++ src/tools/UpdatePackageDependencies.ts | 123 ++++++++++++++++--------- 5 files changed, 164 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 907068219..260f5d857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,13 @@ * As a workaround, make an edit within the file before using Rename Symbol. ## 1.23.17 (Not released yet) +* Greatly improved download experience: when the C# extension is downloaded from the VS Code Marketplace, it will include all of its dependencies already ([#4775](https://github.com/OmniSharp/omnisharp-vscode/issues/4775)) * Fix decompilation authorization check ([#4817](https://github.com/OmniSharp/omnisharp-vscode/issues/4817), PR: [#4821](https://github.com/OmniSharp/omnisharp-vscode/pull/4821)) * Fix typo in Readme.md (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) +* Debugger changes: + * The debugger itself runs on .NET 6 RC2 + * Enhanced support for launchSettings.json ([#3121](https://github.com/OmniSharp/omnisharp-vscode/issues/3121)) + * Fixed process listing on Windows 11 (PR: [#4848](https://github.com/OmniSharp/omnisharp-vscode/pull/4848)) _(Many thanks to [@eternalphane](https://github.com/eternalphane))_ ## 1.23.16 (Oct 12th, 2021) * Show decompilation authorization once per install. ([#3982](https://github.com/OmniSharp/omnisharp-vscode/issues/3982), PR: [#4760](https://github.com/OmniSharp/omnisharp-vscode/pull/4760)) diff --git a/debugger-launchjson.md b/debugger-launchjson.md index fe5b1ec04..c694d4e9c 100644 --- a/debugger-launchjson.md +++ b/debugger-launchjson.md @@ -108,9 +108,26 @@ Environment variables may be passed to your program using this schema: "myVariableName":"theValueGoesHere" } -NOTE: Environment variables can also be configured through a `${cwd}/Properties/launchSettings.json` file, which is useful for environment variables that should be set in all development scenarios -- when the project is started from the command line (`dotnet run`), from Visual Studio Code, or Visual Studio. +## Console (terminal) window + +The `"console"` setting controls what console (terminal) window the target app is launched into. It can be set to any of these values -- + +`"internalConsole"` (default) : the target process's console output (stdout/stderr) goes to the VS Code Debug Console. This is useful for executables that take their input from the network, files, etc. But this does **NOT** work for applications that want to read from the console (ex: `Console.ReadLine`). + +`"integratedTerminal"` : the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application. Alternatively add `"internalConsoleOptions": "neverOpen"` to make it so that the default foreground tab is the terminal tab. + +`"externalTerminal"`: the target process will run inside its own external terminal. + +## launchSettings.json support -Example Properties/launchSettings.json file: +In addition to launch.json, launch options can be configured through a {cwd}/Properties/launchSettings.json file. The advantage of +launchSettings.json is that it allows settings to be shared between Visual Studio Code, full Visual Studio, and `dotnet run`. + +To configure which launchSettings.json profile to use (or to prevent it from being used), set the `launchSettingsProfile` option: + + "launchSettingsProfile": "ProfileNameGoesHere" + +Which would then, for example, use `myVariableName` from this example launchSettings.json file: ```json { @@ -125,15 +142,17 @@ Example Properties/launchSettings.json file: } ``` -## Console (terminal) window - -The `"console"` setting controls what console (terminal) window the target app is launched into. It can be set to any of these values -- +If `launchSettingsProfile` is NOT specified, the first profile with `"commandName": "Project"` will be used. -`"internalConsole"` (default) : the target process's console output (stdout/stderr) goes to the VS Code Debug Console. This is useful for executables that take their input from the network, files, etc. But this does **NOT** work for applications that want to read from the console (ex: `Console.ReadLine`). +If `launchSettingsProfile` is set to null/an empty string, then Properties/launchSettings.json will be ignored. -`"integratedTerminal"` : the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application. Alternatively add `"internalConsoleOptions": "neverOpen"` to make it so that the default foreground tab is the terminal tab. - -`"externalTerminal"`: the target process will run inside its own external terminal. +Restrictions: +1. The launchSettings.json file must be in {cwd}/Properties/launchSettings.json +2. Only profiles with `"commandName": "Project"` are supported. +3. Only `environmentVariables`, `applicationUrl` and `commandLineArgs` properties are supported +4. Settings in launch.json will take precedence over settings in launchSettings.json, so for example, if `args` +is already set to something other than an empty string/array in `launch.json` then the launchSettings.json +content will be ignored. ## Source File Map You can optionally configure how source files are opened by providing a map using this form: diff --git a/package.json b/package.json index 67191b92c..ce9449a14 100644 --- a/package.json +++ b/package.json @@ -217,8 +217,7 @@ { "id": "Debugger", "description": ".NET Core Debugger (Windows / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/b490d6a6de4ec50e2bd22f690489ef6c/coreclr-debug-win7-x64.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-win7-x64.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-win7-x64.zip", "installPath": ".debugger", "platforms": [ "win32" @@ -227,13 +226,12 @@ "x86_64" ], "installTestPath": "./.debugger/vsdbg-ui.exe", - "integrity": "9EA16813520F5E74535739DAD1E9E72465D7F496A6C8465AEA3EF57C86CF320C" + "integrity": "DEE5667896B7399AB0AAA1A1CC10C6FB2B7D8F47AB17C12E40ABA97677AB90D3" }, { "id": "Debugger", "description": ".NET Core Debugger (Windows / ARM64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/82a75a9c89a2e5087908651b602d7d01/coreclr-debug-win10-arm64.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-win10-arm64.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-win10-arm64.zip", "installPath": ".debugger", "platforms": [ "win32" @@ -242,13 +240,12 @@ "arm64" ], "installTestPath": "./.debugger/vsdbg-ui.exe", - "integrity": "FD9A1B46DA9C7226828595826F6CE215DF769C5111D02DB567494A1EB095E155" + "integrity": "30BF86A94A1362465B539DC42995BF2E066F0656B2FF53D259B9ADB2A50DBF3E" }, { "id": "Debugger", "description": ".NET Core Debugger (macOS / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/c1122f7141735472d9583c1124024c55/coreclr-debug-osx-x64.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-x64.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-osx-x64.zip", "installPath": ".debugger/x86_64", "platforms": [ "darwin" @@ -262,13 +259,12 @@ "./vsdbg" ], "installTestPath": "./.debugger/x86_64/vsdbg-ui", - "integrity": "554436E48F02C994BD05AD365EFFF9E242710C49CD2BDE695DBABD222098E323" + "integrity": "EAFB7B0F3489B9F2D89C2BC4CB855729398D25D6F2A6587913732018B9BBB362" }, { "id": "Debugger", "description": ".NET Core Debugger (macOS / arm64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/96a88189c7904a517f3bb59b2dba8bd1/coreclr-debug-osx-arm64.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-arm64.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-osx-arm64.zip", "installPath": ".debugger/arm64", "platforms": [ "darwin" @@ -281,13 +277,12 @@ "./vsdbg" ], "installTestPath": "./.debugger/arm64/vsdbg-ui", - "integrity": "40395770CDBA25FD67D2A5B8630F16146B293EAE8A07205DF1646D1805F87384" + "integrity": "AB272AD7F519FA1564A3C9AA7052D5ADD972A6DDAD7A2B6CA0DF775A7F83704C" }, { "id": "Debugger", "description": ".NET Core Debugger (linux / ARM)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/f346e34bb51c0595cf7f4727cac76907/coreclr-debug-linux-arm.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-arm.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-linux-arm.zip", "installPath": ".debugger", "platforms": [ "linux" @@ -300,13 +295,12 @@ "./vsdbg" ], "installTestPath": "./.debugger/vsdbg-ui", - "integrity": "4283432742665B400B1807A76770475B2CA43895C7E7870D85E34C3ADF4D1B3F" + "integrity": "C03F6DBE1F84717483C016F67AC92C56391798BAB4EE41D58521588D5EDF1ED0" }, { "id": "Debugger", "description": ".NET Core Debugger (linux / ARM64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/7a723bfbda6d196c52084226b6835b36/coreclr-debug-linux-arm64.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-arm64.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-linux-arm64.zip", "installPath": ".debugger", "platforms": [ "linux" @@ -319,13 +313,12 @@ "./vsdbg" ], "installTestPath": "./.debugger/vsdbg-ui", - "integrity": "7C266186F481159BFC40406BF4CE479FC4144179C69128B01CD3E1E3062E8AB4" + "integrity": "4C3564FE7FBD7403E7B987C44FC4B6E532D177BF179321595D892D7239D1293D" }, { "id": "Debugger", "description": ".NET Core Debugger (linux / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/dd019b4c839f458596e26bfcfe6a3e7f/coreclr-debug-linux-x64.zip", - "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-x64.zip", + "url": "https://vsdebugger.azureedge.net/coreclr-debug-1-23-17/coreclr-debug-linux-x64.zip", "installPath": ".debugger", "platforms": [ "linux" @@ -338,7 +331,7 @@ "./vsdbg" ], "installTestPath": "./.debugger/vsdbg-ui", - "integrity": "F389283020F345DA4BAC1067E9D8E5B28BD4306338C651075D07285D0600BE30" + "integrity": "3CF4619DB967FA71FE04615D1A171B9C03E6CA97335BAC3C0E04116490B73336" }, { "id": "Razor", @@ -1238,6 +1231,18 @@ "description": "Attribute 'externalConsole' is deprecated, use 'console' instead.", "default": false }, + "launchSettingsProfile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If specified, indicates the name of the profile in {cwd}/Properties/launchSettings.json to use. This is ignored if launchSettings.json is not found. If this is set to null or an empty string then launchSettings.json is ignored. If this value is not specified the first 'Project' profile will be used.", + "default": "" + }, "sourceFileMap": { "type": "object", "description": "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'", @@ -2344,6 +2349,18 @@ "description": "Attribute 'externalConsole' is deprecated, use 'console' instead.", "default": false }, + "launchSettingsProfile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If specified, indicates the name of the profile in {cwd}/Properties/launchSettings.json to use. This is ignored if launchSettings.json is not found. If this is set to null or an empty string then launchSettings.json is ignored. If this value is not specified the first 'Project' profile will be used.", + "default": "" + }, "sourceFileMap": { "type": "object", "description": "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'", @@ -3750,4 +3767,4 @@ } ] } -} +} \ No newline at end of file diff --git a/src/tools/OptionsSchema.json b/src/tools/OptionsSchema.json index 8dc938413..b1624ab48 100644 --- a/src/tools/OptionsSchema.json +++ b/src/tools/OptionsSchema.json @@ -323,6 +323,18 @@ "description": "Attribute 'externalConsole' is deprecated, use 'console' instead.", "default": false }, + "launchSettingsProfile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "If specified, indicates the name of the profile in {cwd}/Properties/launchSettings.json to use. This is ignored if launchSettings.json is not found. If this is set to null or an empty string then launchSettings.json is ignored. If this value is not specified the first 'Project' profile will be used.", + "default": "" + }, "sourceFileMap": { "type": "object", "description": "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'", diff --git a/src/tools/UpdatePackageDependencies.ts b/src/tools/UpdatePackageDependencies.ts index bf1bb758e..ecb5f665b 100644 --- a/src/tools/UpdatePackageDependencies.ts +++ b/src/tools/UpdatePackageDependencies.ts @@ -28,8 +28,9 @@ export async function updatePackageDependencies(): Promise { const newPrimaryUrls = process.env["NEW_DEPS_URLS"]; const newVersion = process.env["NEW_DEPS_VERSION"]; + const packageId = process.env["NEW_DEPS_ID"]; - if (!newPrimaryUrls || !newVersion) { + if ((!packageId && !newPrimaryUrls) || !newVersion) { console.log(); console.log("'npm run gulp updatePackageDependencies' will update package.json with new URLs of dependencies."); console.log(); @@ -37,57 +38,21 @@ export async function updatePackageDependencies(): Promise { const setEnvVarPrefix = os.platform() === 'win32' ? "set " : "export "; const setEnvVarQuote = os.platform() === 'win32' ? "" : "\'"; console.log(` ${setEnvVarPrefix}NEW_DEPS_URLS=${setEnvVarQuote}https://example1/foo-osx.zip,https://example1/foo-win.zip,https://example1/foo-linux.zip${setEnvVarQuote}`); + console.log("-or-"); + console.log(` ${setEnvVarPrefix}NEW_DEPS_ID=${setEnvVarQuote}Debugger${setEnvVarQuote}`); + console.log("-and-"); console.log(` ${setEnvVarPrefix}NEW_DEPS_VERSION=${setEnvVarQuote}1.2.3${setEnvVarQuote}`); console.log(" npm run gulp updatePackageDependencies"); console.log(); return; } - const newPrimaryUrlArray = newPrimaryUrls.split(','); - for (let urlToUpdate of newPrimaryUrlArray) { - if (!urlToUpdate.startsWith("https://")) { - throw new Error("Unexpected 'NEW_DEPS_URLS' value. All URLs should start with 'https://'."); - } - } - if (! /^[0-9]+\.[0-9]+\.[0-9]+$/.test(newVersion)) { throw new Error("Unexpected 'NEW_DEPS_VERSION' value. Expected format similar to: 1.2.3."); } let packageJSON: PackageJSONFile = JSON.parse(fs.readFileSync('package.json').toString()); - // map from lowercase filename to Package - const mapFileNameToDependency: { [key: string]: Package } = {}; - - // First build the map - packageJSON.runtimeDependencies.forEach(dependency => { - let fileName = getLowercaseFileNameFromUrl(dependency.url); - let existingDependency = mapFileNameToDependency[fileName]; - if (existingDependency !== undefined) { - throw new Error(`Multiple dependencies found with filename '${fileName}': '${existingDependency.url}' and '${dependency.url}'.`); - } - mapFileNameToDependency[fileName] = dependency; - }); - - let findDependencyToUpdate = (url: string): Package => { - let fileName = getLowercaseFileNameFromUrl(url); - let dependency = mapFileNameToDependency[fileName]; - if (dependency === undefined) { - throw new Error(`Unable to update item for url '${url}'. No 'runtimeDependency' found with filename '${fileName}'.`); - } - return dependency; - }; - - // First quickly make sure we could match up the URL to an existing item. - for (let urlToUpdate of newPrimaryUrlArray) { - const dependency = findDependencyToUpdate(urlToUpdate); - //Fallback url should contain a version - verifyVersionSubstringCount(dependency.fallbackUrl, true); - verifyVersionSubstringCount(dependency.installPath); - verifyVersionSubstringCount(dependency.installTestPath); - } - - // Next take another pass to try and update to the URL const eventStream = new EventStream(); eventStream.subscribe((event: Event.BaseEvent) => { switch (event.type) { @@ -104,9 +69,7 @@ export async function updatePackageDependencies(): Promise { return getBufferIntegrityHash(buffer); }; - for (let urlToUpdate of newPrimaryUrlArray) { - let dependency = findDependencyToUpdate(urlToUpdate); - dependency.url = urlToUpdate; + const updateDependency = async (dependency: Package): Promise => { dependency.integrity = await downloadAndGetHash(dependency.url); dependency.fallbackUrl = replaceVersion(dependency.fallbackUrl, newVersion); dependency.installPath = replaceVersion(dependency.installPath, newVersion); @@ -124,6 +87,80 @@ export async function updatePackageDependencies(): Promise { throw new Error(`File downloaded from primary URL '${dependency.url}' doesn't match '${dependency.fallbackUrl}'.`); } } + }; + + if (newPrimaryUrls) { + const newPrimaryUrlArray = newPrimaryUrls.split(','); + for (let urlToUpdate of newPrimaryUrlArray) { + if (!urlToUpdate.startsWith("https://")) { + throw new Error("Unexpected 'NEW_DEPS_URLS' value. All URLs should start with 'https://'."); + } + } + + // map from lowercase filename to Package + const mapFileNameToDependency: { [key: string]: Package } = {}; + + // First build the map + packageJSON.runtimeDependencies.forEach(dependency => { + let fileName = getLowercaseFileNameFromUrl(dependency.url); + let existingDependency = mapFileNameToDependency[fileName]; + if (existingDependency !== undefined) { + throw new Error(`Multiple dependencies found with filename '${fileName}': '${existingDependency.url}' and '${dependency.url}'.`); + } + mapFileNameToDependency[fileName] = dependency; + }); + + let findDependencyToUpdate = (url: string): Package => { + let fileName = getLowercaseFileNameFromUrl(url); + let dependency = mapFileNameToDependency[fileName]; + if (dependency === undefined) { + throw new Error(`Unable to update item for url '${url}'. No 'runtimeDependency' found with filename '${fileName}'.`); + } + return dependency; + }; + + // First quickly make sure we could match up the URL to an existing item. + for (let urlToUpdate of newPrimaryUrlArray) { + const dependency = findDependencyToUpdate(urlToUpdate); + //Fallback url should contain a version + verifyVersionSubstringCount(dependency.fallbackUrl, true); + verifyVersionSubstringCount(dependency.installPath); + verifyVersionSubstringCount(dependency.installTestPath); + } + + for (let urlToUpdate of newPrimaryUrlArray) { + let dependency = findDependencyToUpdate(urlToUpdate); + dependency.url = urlToUpdate; + + await updateDependency(dependency); + } + } + else { + let packageFound = false; + // First quickly make sure that 'url' contains a version + for (let dependency of packageJSON.runtimeDependencies) { + if (dependency.id !== packageId) { + continue; + } + packageFound = true; + verifyVersionSubstringCount(dependency.url, true); + verifyVersionSubstringCount(dependency.fallbackUrl, true); + verifyVersionSubstringCount(dependency.installPath); + verifyVersionSubstringCount(dependency.installTestPath); + } + if (!packageFound) { + throw new Error(`Failed to find package with 'id' of '${packageId}'.`); + } + + // Now update the versions + for (let dependency of packageJSON.runtimeDependencies) { + if (dependency.id !== packageId) { + continue; + } + + dependency.url = replaceVersion(dependency.url, newVersion); + await updateDependency(dependency); + } } let content = JSON.stringify(packageJSON, null, 2); From 64729006dcc28ea6a5648c054a0c5d6d10a4c52f Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 28 Oct 2021 15:49:17 -0700 Subject: [PATCH 08/15] Update release step ids --- .github/workflows/release-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index e5eb9dd50..123ecad09 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -31,7 +31,7 @@ jobs: run: node -e "console.log('VERSION=' + require('./package.json').version)" >> $GITHUB_ENV - name: Upload release build (darwin-arm64) - id: upload-release-asset + id: upload-release-asset-darwin-arm64 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -42,7 +42,7 @@ jobs: asset_content_type: application/zip - name: Upload release build (darwin-x64) - id: upload-release-asset + id: upload-release-asset-darwin-x64 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -53,7 +53,7 @@ jobs: asset_content_type: application/zip - name: Upload release build (linux-x64) - id: upload-release-asset + id: upload-release-asset-linux-x64 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -64,7 +64,7 @@ jobs: asset_content_type: application/zip - name: Upload release build (win32-arm64) - id: upload-release-asset + id: upload-release-asset-win32-arm64 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -75,7 +75,7 @@ jobs: asset_content_type: application/zip - name: Upload release build (win32-ia32) - id: upload-release-asset + id: upload-release-asset-win32-ia32 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -86,7 +86,7 @@ jobs: asset_content_type: application/zip - name: Upload release build (win32-x64) - id: upload-release-asset + id: upload-release-asset-win32-x64 uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c1cab63fa577c8a0ebf72f59957304fe51a7e2a7 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 28 Oct 2021 16:39:02 -0700 Subject: [PATCH 09/15] Remove parens from package name in Release-CI --- .github/workflows/release-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 123ecad09..35aff1b54 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -37,8 +37,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}-(darwin-arm64).vsix - asset_name: csharp-${{ env.VERSION }}-(darwin-arm64).vsix + asset_path: ./csharp-${{ env.VERSION }}-darwin-arm64.vsix + asset_name: csharp-${{ env.VERSION }}-darwin-arm64.vsix asset_content_type: application/zip - name: Upload release build (darwin-x64) @@ -48,8 +48,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}-(darwin-x64).vsix - asset_name: csharp-${{ env.VERSION }}-(darwin-x64).vsix + asset_path: ./csharp-${{ env.VERSION }}-darwin-x64.vsix + asset_name: csharp-${{ env.VERSION }}-darwin-x64.vsix asset_content_type: application/zip - name: Upload release build (linux-x64) @@ -59,8 +59,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}-(linux-x64).vsix - asset_name: csharp-${{ env.VERSION }}-(linux-x64).vsix + asset_path: ./csharp-${{ env.VERSION }}-linux-x64.vsix + asset_name: csharp-${{ env.VERSION }}-linux-x64.vsix asset_content_type: application/zip - name: Upload release build (win32-arm64) @@ -70,8 +70,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}-(win32-arm64).vsix - asset_name: csharp-${{ env.VERSION }}-(win32-arm64).vsix + asset_path: ./csharp-${{ env.VERSION }}-win32-arm64.vsix + asset_name: csharp-${{ env.VERSION }}-win32-arm64.vsix asset_content_type: application/zip - name: Upload release build (win32-ia32) @@ -81,8 +81,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}-(win32-ia32).vsix - asset_name: csharp-${{ env.VERSION }}-(win32-ia32).vsix + asset_path: ./csharp-${{ env.VERSION }}-win32-ia32.vsix + asset_name: csharp-${{ env.VERSION }}-win32-ia32.vsix asset_content_type: application/zip - name: Upload release build (win32-x64) @@ -92,6 +92,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./csharp-${{ env.VERSION }}-(win32-x64).vsix - asset_name: csharp-${{ env.VERSION }}-(win32-x64).vsix + asset_path: ./csharp-${{ env.VERSION }}-win32-x64.vsix + asset_name: csharp-${{ env.VERSION }}-win32-x64.vsix asset_content_type: application/zip From 7202d3c9c450e47c7c8f55efda3a32b47bed6c8b Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Thu, 28 Oct 2021 17:42:59 -0700 Subject: [PATCH 10/15] Fix release CI package file name problem (#4859) The release CI was expected `csharp--` but the code was creating `csharp.-`. This fixes it. --- tasks/offlinePackagingTasks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/offlinePackagingTasks.ts b/tasks/offlinePackagingTasks.ts index 9ca0fb8a0..b20a1dfb0 100644 --- a/tasks/offlinePackagingTasks.ts +++ b/tasks/offlinePackagingTasks.ts @@ -35,7 +35,7 @@ export const offlinePackages = [ export function getPackageName(packageJSON: any, vscodePlatformId: string) { const name = packageJSON.name; const version = packageJSON.version; - return `${name}.${version}-${vscodePlatformId}.vsix`; + return `${name}-${version}-${vscodePlatformId}.vsix`; } gulp.task('vsix:release:package:platform-specific', async () => { From 3fa3e19c01ece8e4c8e3a690c726655e0caaf65b Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 29 Oct 2021 13:55:39 -0700 Subject: [PATCH 11/15] Support relative paths with omnisharp.testRunSettings --- package.json | 10 +- src/features/dotnetTest.ts | 31 ++-- .../dotnetTest.integration.test.ts | 133 ++++++++++++++++++ 3 files changed, 164 insertions(+), 10 deletions(-) create mode 100644 test/integrationTests/dotnetTest.integration.test.ts diff --git a/package.json b/package.json index 67191b92c..eb46c7acb 100644 --- a/package.json +++ b/package.json @@ -843,6 +843,14 @@ "default": false, "description": "(EXPERIMENTAL) Enables support for resolving completion edits asynchronously. This can speed up time to show the completion list, particularly override and partial method completion lists, at the cost of slight delays after inserting a completion item. Most completion items will have no noticeable impact with this feature, but typing immediately after inserting an override or partial method completion, before the insert is completed, can have unpredictable results." }, + "omnisharp.testRunSettings": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "Path to the .runsettings file which should be used when running unit tests." + }, "razor.plugin.path": { "type": [ "string", @@ -3750,4 +3758,4 @@ } ] } -} +} \ No newline at end of file diff --git a/src/features/dotnetTest.ts b/src/features/dotnetTest.ts index 3d87639f9..2ded26e39 100644 --- a/src/features/dotnetTest.ts +++ b/src/features/dotnetTest.ts @@ -172,7 +172,7 @@ export default class TestManager extends AbstractProvider { public async discoverTests(fileName: string, testFrameworkName: string, noBuild: boolean): Promise { let targetFrameworkVersion = await this._recordRunAndGetFrameworkVersion(fileName, testFrameworkName); - let runSettings = vscode.workspace.getConfiguration('omnisharp').get('testRunSettings'); + let runSettings = this._getRunSettings(fileName); const request: protocol.V2.DiscoverTestsRequest = { FileName: fileName, @@ -191,8 +191,21 @@ export default class TestManager extends AbstractProvider { } } - private _getRunSettings(): string | undefined { - return vscode.workspace.getConfiguration('omnisharp').get('testRunSettings'); + private _getRunSettings(filename: string): string | undefined { + const testSettingsPath = vscode.workspace.getConfiguration('omnisharp').get('testRunSettings'); + if (!testSettingsPath) { + return undefined; + } + + if (path.isAbsolute(testSettingsPath)) { + return testSettingsPath; + } + + // Path is relative to the workspace. Create absolute path. + const fileUri = vscode.Uri.file(filename); + const workspaceFolder = vscode.workspace.getWorkspaceFolder(fileUri); + + return path.join(workspaceFolder.uri.fsPath, testSettingsPath); } public async runDotnetTest(testMethod: string, fileName: string, testFrameworkName: string, noBuild: boolean = false) { @@ -204,7 +217,7 @@ export default class TestManager extends AbstractProvider { }); let targetFrameworkVersion = await this._recordRunAndGetFrameworkVersion(fileName, testFrameworkName); - let runSettings = this._getRunSettings(); + let runSettings = this._getRunSettings(fileName); try { let results = await this._runTest(fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, noBuild); @@ -228,7 +241,7 @@ export default class TestManager extends AbstractProvider { }); let targetFrameworkVersion = await this._recordRunAndGetFrameworkVersion(fileName, testFrameworkName); - let runSettings = this._getRunSettings(); + let runSettings = this._getRunSettings(fileName); try { let results = await this._runTestsInClass(fileName, runSettings, testFrameworkName, targetFrameworkVersion, methodsInClass, noBuild); @@ -269,7 +282,7 @@ export default class TestManager extends AbstractProvider { }); let targetFrameworkVersion = await this._recordRunAndGetFrameworkVersion(fileName); - let runSettings = this._getRunSettings(); + let runSettings = this._getRunSettings(fileName); const request: protocol.V2.RunTestsInContextRequest = { FileName: fileName, @@ -395,7 +408,7 @@ export default class TestManager extends AbstractProvider { this._eventStream.post(new DotNetTestDebugStart(testMethod)); let { debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName, testFrameworkName); - let runSettings = this._getRunSettings(); + let runSettings = this._getRunSettings(fileName); try { let config = await this._getLaunchConfigurationForVSTest(fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); @@ -415,7 +428,7 @@ export default class TestManager extends AbstractProvider { this._eventStream.post(new DotNetTestsInClassDebugStart(className)); let { debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName, testFrameworkName); - let runSettings = this._getRunSettings(); + let runSettings = this._getRunSettings(fileName); try { let config = await this._getLaunchConfigurationForVSTestClass(fileName, methodsToRun, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); @@ -440,7 +453,7 @@ export default class TestManager extends AbstractProvider { let { debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName); - let runSettings = this._getRunSettings(); + let runSettings = this._getRunSettings(fileName); try { let config = await this._getLaunchConfigurationForVSTestInContext(fileName, active.line, active.character, runSettings, targetFrameworkVersion, debugEventListener); diff --git a/test/integrationTests/dotnetTest.integration.test.ts b/test/integrationTests/dotnetTest.integration.test.ts new file mode 100644 index 000000000..2b8646b09 --- /dev/null +++ b/test/integrationTests/dotnetTest.integration.test.ts @@ -0,0 +1,133 @@ +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as path from 'path'; + +import { should, expect } from 'chai'; +import { activateCSharpExtension, isSlnWithCsproj } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { EventStream } from '../../src/EventStream'; +import { EventType } from '../../src/omnisharp/EventType'; +import { BaseEvent, OmnisharpRequestMessage } from '../../src/omnisharp/loggingEvents'; +import { poll } from './poll'; +import { V2 } from '../../src/omnisharp/protocol'; + +const chai = require('chai'); +chai.use(require('chai-arrays')); +chai.use(require('chai-fs')); + +async function waitActivityToSettle(stream: EventStream, timeout: number): Promise { + let event: BaseEvent = { type: 0 }; + + const subscription = stream.subscribe((e: BaseEvent) => event = e); + + await poll(() => event, timeout, 500, e => !e || (event = null)); + + subscription.unsubscribe(); +} + +async function waitForEvent(stream: EventStream, captureType: EventType, stopCondition: (e: T) => boolean, timeout: number): Promise { + let event: T = null; + + const subscription = stream.subscribe((e: BaseEvent) => { + if (e.type === captureType) { + const tEvent = e; + + if (stopCondition(tEvent)) { + event = tEvent; + subscription.unsubscribe(); + } + } + }); + + await poll(() => event, timeout, 500, e => !!e); + + return event; +} + +suite(`DotnetTest: ${testAssetWorkspace.description}`, function () { + let fileUri: vscode.Uri; + let eventStream: EventStream; + + suiteSetup(async function () { + should(); + + // These tests only run on the slnWithCsproj solution + if (!isSlnWithCsproj(vscode.workspace)) { + this.skip(); + } + else { + const activation = await activateCSharpExtension(); + await testAssetWorkspace.restoreAndWait(activation); + + eventStream = activation.eventStream; + + let fileName = 'UnitTest1.cs'; + let projectDirectory = testAssetWorkspace.projects[2].projectDirectoryPath; + let filePath = path.join(projectDirectory, fileName); + fileUri = vscode.Uri.file(filePath); + + await vscode.commands.executeCommand("vscode.open", fileUri); + + await waitActivityToSettle(eventStream, 90 * 1000); + } + }); + + suiteTeardown(async () => { + await testAssetWorkspace.cleanupWorkspace(); + }); + + test("Undefined runsettings path is unchanged", async function () { + const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); + await omnisharpConfig.update('testRunSettings', undefined); + + const eventWaiter = waitForEvent(eventStream, EventType.OmnisharpRequestMessage, e => e.request.command === V2.Requests.RunTestsInContext, /* timeout */ 10 * 1000); + + await vscode.commands.executeCommand('dotnet.test.runTestsInContext'); + + const event = await eventWaiter; + const runTestsRequest = event.request.data; + + expect(runTestsRequest.RunSettings).to.be.undefined; + }); + + test("Absolute runsettings path is unchanged", async function () { + const relativeRunSettingsPath = `.\\settings\\TestSettings.runsettings`.replace("\\", path.sep); + const absoluteRunSettingsPath = path.join(process.cwd(), relativeRunSettingsPath); + + const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); + await omnisharpConfig.update('testRunSettings', absoluteRunSettingsPath); + + const eventWaiter = waitForEvent(eventStream, EventType.OmnisharpRequestMessage, e => e.request.command === V2.Requests.RunTestsInContext, /* timeout */ 10 * 1000); + + await vscode.commands.executeCommand('dotnet.test.runTestsInContext'); + + const event = await eventWaiter; + const runTestsRequest = event.request.data; + + expect(runTestsRequest.RunSettings).to.be.equal(absoluteRunSettingsPath); + }); + + test("Relative runsettings path is made absolute", async function () { + const endingPath = 'settings\\TestSettings.runsettings'.replace("\\", path.sep); + const relativeRunSettingPath = `.\\${endingPath}`.replace("\\", path.sep); + + const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); + await omnisharpConfig.update('testRunSettings', relativeRunSettingPath); + + const eventWaiter = waitForEvent(eventStream, EventType.OmnisharpRequestMessage, e => e.request.command === V2.Requests.RunTestsInContext, /* timeout */ 10 * 1000); + + await vscode.commands.executeCommand('dotnet.test.runTestsInContext'); + + const event = await eventWaiter; + const runTestsRequest = event.request.data; + + expect(runTestsRequest.RunSettings).to.be.not.null; + expect(runTestsRequest.RunSettings.endsWith(endingPath), "Path includes relative path").to.be.true; + expect(path.isAbsolute(runTestsRequest.RunSettings), "Path is absolute").to.be.true; + }); +}); + From 9b740bd088aa47fc7dc7292eaf99669d2c84f1e4 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Fri, 29 Oct 2021 13:55:59 -0700 Subject: [PATCH 12/15] Fix reported tslint errors --- test/featureTests/processPicker.test.ts | 2 +- test/releaseTests/offlinePackage.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/featureTests/processPicker.test.ts b/test/featureTests/processPicker.test.ts index 24cb59f8f..5d7aa96c1 100644 --- a/test/featureTests/processPicker.test.ts +++ b/test/featureTests/processPicker.test.ts @@ -192,7 +192,7 @@ suite("Remote Process Picker: Validate quoting arguments.", () => { const process3: Process = parsedOutput[2]; const process4: Process = parsedOutput[3]; - var should = require('chai').should(); + const should = require('chai').should(); should.not.exist(process1.commandLine); process1.name.should.equal('System Idle Process'); process1.pid.should.equal('0'); diff --git a/test/releaseTests/offlinePackage.test.ts b/test/releaseTests/offlinePackage.test.ts index 028ccf84a..c25dac56a 100644 --- a/test/releaseTests/offlinePackage.test.ts +++ b/test/releaseTests/offlinePackage.test.ts @@ -42,7 +42,7 @@ suite("Offline packaging of VSIX", function () { test(`Given Platform: ${platformInfo.platform} and Architecture: ${platformInfo.architecture}, the vsix file is created`, () => { const expectedVsixName = getPackageName(packageJson, packageId); - const vsixFile = vsixFiles.find(file => file.endsWith(expectedVsixName)) + const vsixFile = vsixFiles.find(file => file.endsWith(expectedVsixName)); expect(vsixFile, `offline packaging did not build package ${expectedVsixName}`) .to.not.be.null; }); From 04f2bff4c571a3342b37694bc47ad2a3ccc46953 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Wed, 3 Nov 2021 17:14:35 +0100 Subject: [PATCH 13/15] Update to 1.37.17 dependencies --- .vscode/launch.json | 4 ++-- package.json | 52 ++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 197fd0271..4118e24e0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -188,8 +188,8 @@ "updatePackageDependencies" ], "env": { - "NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9ae3ed99fc0c41c7139751dde6f2bc78/omnisharp-linux-x64-1.37.16.zip,https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/06bba46fa5450b4a2595e709fe59c131/omnisharp-linux-x86-1.37.16.zip,https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/0ea1ea1eae48552a1992ed6df782353a/omnisharp-osx-1.37.16.zip,https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/5c36b37a4b91460927fa42658f0271bb/omnisharp-win-x64-1.37.16.zip,https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9f47cd0a44db6e2d5bbdeb9e3e72aa8d/omnisharp-win-x86-1.37.16.zip", - "NEW_DEPS_VERSION": "1.37.16" + "NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/6cf1b92d91f942929922013b2139cca9/omnisharp-linux-x64-1.37.17.zip,https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/6f3d66d4ffa4fa627225221fb00e106e/omnisharp-linux-x86-1.37.17.zip,https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/9f560aead2b823079775c00110972c04/omnisharp-osx-1.37.17.zip,https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/c868258dbd98f22b60154552f432edfa/omnisharp-win-x64-1.37.17.zip,https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/66f82f6333721c464316d7daa07bc115/omnisharp-win-x86-1.37.17.zip", + "NEW_DEPS_VERSION": "1.37.17" }, "cwd": "${workspaceFolder}" } diff --git a/package.json b/package.json index 8566f5896..772acc087 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ } }, "defaults": { - "omniSharp": "1.37.16", + "omniSharp": "1.37.17", "razor": "6.0.0-preview.5.21358.6" }, "main": "./dist/extension", @@ -126,9 +126,9 @@ { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 4.6 / x86)", - "url": "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9f47cd0a44db6e2d5bbdeb9e3e72aa8d/omnisharp-win-x86-1.37.16.zip", - "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-win-x86-1.37.16.zip", - "installPath": ".omnisharp/1.37.16", + "url": "https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/66f82f6333721c464316d7daa07bc115/omnisharp-win-x86-1.37.17.zip", + "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.17/omnisharp-win-x86-1.37.17.zip", + "installPath": ".omnisharp/1.37.17", "platforms": [ "win32" ], @@ -136,32 +136,32 @@ "x86", "arm64" ], - "installTestPath": "./.omnisharp/1.37.16/OmniSharp.exe", + "installTestPath": "./.omnisharp/1.37.17/OmniSharp.exe", "platformId": "win-x86", - "integrity": "9299D1D2318929BC74BC158CDE73CF850C2768F832D89B6AD31ABC333A0F5002" + "integrity": "95ECBABF821ED45E4E6F3173E2165C5F593FC4611040475DBD6D54C16D78F4F8" }, { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 4.6 / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/5c36b37a4b91460927fa42658f0271bb/omnisharp-win-x64-1.37.16.zip", - "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-win-x64-1.37.16.zip", - "installPath": ".omnisharp/1.37.16", + "url": "https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/c868258dbd98f22b60154552f432edfa/omnisharp-win-x64-1.37.17.zip", + "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.17/omnisharp-win-x64-1.37.17.zip", + "installPath": ".omnisharp/1.37.17", "platforms": [ "win32" ], "architectures": [ "x86_64" ], - "installTestPath": "./.omnisharp/1.37.16/OmniSharp.exe", + "installTestPath": "./.omnisharp/1.37.17/OmniSharp.exe", "platformId": "win-x64", - "integrity": "64F97DCA98CB26A835EA2D9E5FF5105B7E33E150B0822BC76CD0C7BCF773AF7D" + "integrity": "BD81F1284FA4A9E6D63292074D0304B65CD39C24539CB761B54E8727619070DF" }, { "id": "OmniSharp", "description": "OmniSharp for OSX", - "url": "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/0ea1ea1eae48552a1992ed6df782353a/omnisharp-osx-1.37.16.zip", - "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-osx-1.37.16.zip", - "installPath": ".omnisharp/1.37.16", + "url": "https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/9f560aead2b823079775c00110972c04/omnisharp-osx-1.37.17.zip", + "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.17/omnisharp-osx-1.37.17.zip", + "installPath": ".omnisharp/1.37.17", "platforms": [ "darwin" ], @@ -169,16 +169,16 @@ "./mono.osx", "./run" ], - "installTestPath": "./.omnisharp/1.37.16/run", + "installTestPath": "./.omnisharp/1.37.17/run", "platformId": "osx", - "integrity": "37D20A032D491DC2460B6E7C4488B8BE047922A387253B2C943407FD4F770F42" + "integrity": "43D6B18F390B8ED92231044E87413831E565E9AB5938223B19CA97B3628DDDF4" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (x86)", - "url": "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/06bba46fa5450b4a2595e709fe59c131/omnisharp-linux-x86-1.37.16.zip", - "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-linux-x86-1.37.16.zip", - "installPath": ".omnisharp/1.37.16", + "url": "https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/6f3d66d4ffa4fa627225221fb00e106e/omnisharp-linux-x86-1.37.17.zip", + "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.17/omnisharp-linux-x86-1.37.17.zip", + "installPath": ".omnisharp/1.37.17", "platforms": [ "linux" ], @@ -190,16 +190,16 @@ "./mono.linux-x86", "./run" ], - "installTestPath": "./.omnisharp/1.37.16/run", + "installTestPath": "./.omnisharp/1.37.17/run", "platformId": "linux-x86", - "integrity": "CB1D8578C0D9AF4A5EDF469DADA4CD9B7F3BCF71FC6BD5947EB500A2036A100A" + "integrity": "75676E50D9FB62B9DC20A6A10E65420B54EFE2FFAE80AC21F59A4C483A4902BB" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9ae3ed99fc0c41c7139751dde6f2bc78/omnisharp-linux-x64-1.37.16.zip", - "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-linux-x64-1.37.16.zip", - "installPath": ".omnisharp/1.37.16", + "url": "https://download.visualstudio.microsoft.com/download/pr/47df6cf8-7648-4fff-9e9c-304f0202d31c/6cf1b92d91f942929922013b2139cca9/omnisharp-linux-x64-1.37.17.zip", + "fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.17/omnisharp-linux-x64-1.37.17.zip", + "installPath": ".omnisharp/1.37.17", "platforms": [ "linux" ], @@ -210,9 +210,9 @@ "./mono.linux-x86_64", "./run" ], - "installTestPath": "./.omnisharp/1.37.16/run", + "installTestPath": "./.omnisharp/1.37.17/run", "platformId": "linux-x64", - "integrity": "712012B56AA8155B4B976C3F43C88882EB059C1BE9FFB4A57582F06698564B28" + "integrity": "34276181B4C1F9968AFA10DEC058F6A2D79DE362FA01B565A04E879CA84A74FE" }, { "id": "Debugger", From 1d9f4e01da4eacfed11fa6844ebda591ed9c5f05 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Wed, 3 Nov 2021 17:39:21 +0100 Subject: [PATCH 14/15] Update changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 260f5d857..dc66be4eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,17 @@ * Renaming symbol fails within a file that had recently been renamed without saving changes. * As a workaround, make an edit within the file before using Rename Symbol. -## 1.23.17 (Not released yet) +## 1.23.17 * Greatly improved download experience: when the C# extension is downloaded from the VS Code Marketplace, it will include all of its dependencies already ([#4775](https://github.com/OmniSharp/omnisharp-vscode/issues/4775)) * Fix decompilation authorization check ([#4817](https://github.com/OmniSharp/omnisharp-vscode/issues/4817), PR: [#4821](https://github.com/OmniSharp/omnisharp-vscode/pull/4821)) * Fix typo in Readme.md (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) +* Fix indentation level and spacing for xUnit fact snippet. (PR: [#4831](https://github.com/OmniSharp/omnisharp-vscode/pull/4831)) + +* Enhance sourecFileMap documentation (PR: [#4844](https://github.com/OmniSharp/omnisharp-vscode/pull/4844)) +* F (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) +* Fi (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) +* Support relative paths with omnisharp.testRunSettings (PR: [#4860](https://github.com/OmniSharp/omnisharp-vscode/pull/4860)) + * Debugger changes: * The debugger itself runs on .NET 6 RC2 * Enhanced support for launchSettings.json ([#3121](https://github.com/OmniSharp/omnisharp-vscode/issues/3121)) From 5eb97957f91f45c7bf889d2115c23e3c19acc223 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Wed, 3 Nov 2021 17:41:49 +0100 Subject: [PATCH 15/15] Update readme --- CHANGELOG.md | 20 +++++++++++++++----- README.md | 38 +++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc66be4eb..cdce15c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,16 +16,26 @@ * Fix decompilation authorization check ([#4817](https://github.com/OmniSharp/omnisharp-vscode/issues/4817), PR: [#4821](https://github.com/OmniSharp/omnisharp-vscode/pull/4821)) * Fix typo in Readme.md (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) * Fix indentation level and spacing for xUnit fact snippet. (PR: [#4831](https://github.com/OmniSharp/omnisharp-vscode/pull/4831)) - -* Enhance sourecFileMap documentation (PR: [#4844](https://github.com/OmniSharp/omnisharp-vscode/pull/4844)) -* F (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) -* Fi (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) -* Support relative paths with omnisharp.testRunSettings (PR: [#4860](https://github.com/OmniSharp/omnisharp-vscode/pull/4860)) +* Support relative paths with omnisharp.testRunSettings (PR: [#4860](https://github.com/OmniSharp/omnisharp-vscode/pull/4860)) (PR: [#4849](https://github.com/OmniSharp/omnisharp-vscode/pull/4849)) +* Add `CimAttachItemsProvider` to replace `WmicAttachItemsProvider` (PR: [#4848](https://github.com/OmniSharp/omnisharp-vscode/pull/4848)) +* Enhance sourceFileMap documentation (PR: [#4844](https://github.com/OmniSharp/omnisharp-vscode/pull/4844)) +* Update the indentation level and spacing for the '"xUnit Test" fact' snippet. (PR: [#4831](https://github.com/OmniSharp/omnisharp-vscode/pull/4831)) * Debugger changes: * The debugger itself runs on .NET 6 RC2 * Enhanced support for launchSettings.json ([#3121](https://github.com/OmniSharp/omnisharp-vscode/issues/3121)) * Fixed process listing on Windows 11 (PR: [#4848](https://github.com/OmniSharp/omnisharp-vscode/pull/4848)) _(Many thanks to [@eternalphane](https://github.com/eternalphane))_ + * Update debugger to 1.23.17 (PR: [#4855](https://github.com/OmniSharp/omnisharp-vscode/pull/4855)) + * Update Debugger Labels (PR: [#4798](https://github.com/OmniSharp/omnisharp-vscode/pull/4798)) + * Add Debug Welcome View (PR: [#4797](https://github.com/OmniSharp/omnisharp-vscode/pull/4797)) + +* Update OmniSharp version to 1.37.17: + * Update versions to match dotnet SDK 6.0.1xx (PR: [omnisharp-roslyn#2262](https://github.com/OmniSharp/omnisharp-roslyn/pull/2262)) + * Remove all completion commit characters in suggestion mode. ([omnisharp-roslyn#1974](https://github.com/OmniSharp/omnisharp-vscode/issues/1974), [omnisharp-roslyn#3219](https://github.com/OmniSharp/omnisharp-vscode/issues/3219), [omnisharp-roslyn#3647](https://github.com/OmniSharp/omnisharp-vscode/issues/3647), [omnisharp-roslyn#4833](https://github.com/OmniSharp/omnisharp-vscode/issues/4833), PR: [omnisharp-roslyn#2253](https://github.com/OmniSharp/omnisharp-roslyn/pull/2253)) + * fixed logging interpolation in ProjectManager (PR: [omnisharp-roslyn#2246](https://github.com/OmniSharp/omnisharp-roslyn/pull/2246)) + * Support signature help for implicit object creation ([omnisharp-roslyn#2243](https://github.com/OmniSharp/omnisharp-roslyn/issues/2243), PR: [omnisharp-roslyn#2244](https://github.com/OmniSharp/omnisharp-roslyn/pull/2244)) + * Implement /v2/gotodefinition for Cake ([omnisharp-roslyn#2209](https://github.com/OmniSharp/omnisharp-roslyn/issues/2209), PR: [omnisharp-roslyn#2212](https://github.com/OmniSharp/omnisharp-roslyn/pull/2212)) + ## 1.23.16 (Oct 12th, 2021) * Show decompilation authorization once per install. ([#3982](https://github.com/OmniSharp/omnisharp-vscode/issues/3982), PR: [#4760](https://github.com/OmniSharp/omnisharp-vscode/pull/4760)) diff --git a/README.md b/README.md index de7976cd9..155fc99ef 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,31 @@ The .NET 5 SDK requires version 16.8 of MSBuild. For Windows users who have Visual Studio installed, this means you will need to be on the latest Visual Studio 16.8 Preview. For MacOS and Linux users who have Mono installed, this means you will need to set `omnisharp.useGlobalMono` to `never` until a version of Mono ships with MSBuild 16.8. +## What's new in 1.23.17 +* Greatly improved download experience: when the C# extension is downloaded from the VS Code Marketplace, it will include all of its dependencies already ([#4775](https://github.com/OmniSharp/omnisharp-vscode/issues/4775)) +* Fix decompilation authorization check ([#4817](https://github.com/OmniSharp/omnisharp-vscode/issues/4817), PR: [#4821](https://github.com/OmniSharp/omnisharp-vscode/pull/4821)) +* Fix typo in Readme.md (PR: [#4819](https://github.com/OmniSharp/omnisharp-vscode/pull/4819)) +* Fix indentation level and spacing for xUnit fact snippet. (PR: [#4831](https://github.com/OmniSharp/omnisharp-vscode/pull/4831)) +* Support relative paths with omnisharp.testRunSettings (PR: [#4860](https://github.com/OmniSharp/omnisharp-vscode/pull/4860)) (PR: [#4849](https://github.com/OmniSharp/omnisharp-vscode/pull/4849)) +* Add `CimAttachItemsProvider` to replace `WmicAttachItemsProvider` (PR: [#4848](https://github.com/OmniSharp/omnisharp-vscode/pull/4848)) +* Enhance sourceFileMap documentation (PR: [#4844](https://github.com/OmniSharp/omnisharp-vscode/pull/4844)) +* Update the indentation level and spacing for the '"xUnit Test" fact' snippet. (PR: [#4831](https://github.com/OmniSharp/omnisharp-vscode/pull/4831)) + +* Debugger changes: + * The debugger itself runs on .NET 6 RC2 + * Enhanced support for launchSettings.json ([#3121](https://github.com/OmniSharp/omnisharp-vscode/issues/3121)) + * Fixed process listing on Windows 11 (PR: [#4848](https://github.com/OmniSharp/omnisharp-vscode/pull/4848)) _(Many thanks to [@eternalphane](https://github.com/eternalphane))_ + * Update debugger to 1.23.17 (PR: [#4855](https://github.com/OmniSharp/omnisharp-vscode/pull/4855)) + * Update Debugger Labels (PR: [#4798](https://github.com/OmniSharp/omnisharp-vscode/pull/4798)) + * Add Debug Welcome View (PR: [#4797](https://github.com/OmniSharp/omnisharp-vscode/pull/4797)) + +* Update OmniSharp version to 1.37.17: + * Update versions to match dotnet SDK 6.0.1xx (PR: [omnisharp-roslyn#2262](https://github.com/OmniSharp/omnisharp-roslyn/pull/2262)) + * Remove all completion commit characters in suggestion mode. ([omnisharp-roslyn#1974](https://github.com/OmniSharp/omnisharp-vscode/issues/1974), [omnisharp-roslyn#3219](https://github.com/OmniSharp/omnisharp-vscode/issues/3219), [omnisharp-roslyn#3647](https://github.com/OmniSharp/omnisharp-vscode/issues/3647), [omnisharp-roslyn#4833](https://github.com/OmniSharp/omnisharp-vscode/issues/4833), PR: [omnisharp-roslyn#2253](https://github.com/OmniSharp/omnisharp-roslyn/pull/2253)) + * fixed logging interpolation in ProjectManager (PR: [omnisharp-roslyn#2246](https://github.com/OmniSharp/omnisharp-roslyn/pull/2246)) + * Support signature help for implicit object creation ([omnisharp-roslyn#2243](https://github.com/OmniSharp/omnisharp-roslyn/issues/2243), PR: [omnisharp-roslyn#2244](https://github.com/OmniSharp/omnisharp-roslyn/pull/2244)) + * Implement /v2/gotodefinition for Cake ([omnisharp-roslyn#2209](https://github.com/OmniSharp/omnisharp-roslyn/issues/2209), PR: [omnisharp-roslyn#2212](https://github.com/OmniSharp/omnisharp-roslyn/pull/2212)) + ## What's new in 1.23.16 * Show decompilation authorization once per install. ([#3982](https://github.com/OmniSharp/omnisharp-vscode/issues/3982), PR: [#4760](https://github.com/OmniSharp/omnisharp-vscode/pull/4760)) * Launch with first Folder or Solution target found (PR: [#4780](https://github.com/OmniSharp/omnisharp-vscode/pull/4780)) @@ -55,19 +80,6 @@ For MacOS and Linux users who have Mono installed, this means you will need to s * Improved logging in project manager (PR: [omnisharp-roslyn#2203](https://github.com/OmniSharp/omnisharp-roslyn/pull/2203)) * Log a warning when external features path has no assemblies ([omnisharp-roslyn#2201](https://github.com/OmniSharp/omnisharp-roslyn/issues/2201), PR: [omnisharp-roslyn#2202](https://github.com/OmniSharp/omnisharp-roslyn/pull/2202)) -## What's new in 1.23.14 -* Bump minimum required version of VS Code (PR: [#4664](https://github.com/OmniSharp/omnisharp-vscode/pull/4664)) -* Change useGlobalMono scope to default (window) (PR: [#4674](https://github.com/OmniSharp/omnisharp-vscode/pull/4674)) -* Fix a typo in package.json (PR: [#4675](https://github.com/OmniSharp/omnisharp-vscode/pull/4675)) -* Update OmniSharp version to 1.37.14 - * Update Roslyn to 4.0.0-2.21354.7 (PR: [omnisharp-roslyn#2189](https://github.com/OmniSharp/omnisharp-roslyn/pull/2189)) - * Update included Build Tools to match .NET SDK 6 Preview 6 (PR: [omnisharp-roslyn#2187](https://github.com/OmniSharp/omnisharp-roslyn/pull/2187)) - * Update to latest .NET SDKs (PR: [omnisharp-roslyn#2197](https://github.com/OmniSharp/omnisharp-roslyn/pull/2197)) - * Update included Build Tools to match .NET SDK 6 Preview 7 (PR: [omnisharp-roslyn#2196](https://github.com/OmniSharp/omnisharp-roslyn/pull/2196)) - * Upgrade McMaster.Extensions.CommandLineUtils to 3.1.0 ([#4090](https://github.com/OmniSharp/omnisharp-vscode/issues/4090), PR: [omnisharp-roslyn#2192](https://github.com/OmniSharp/omnisharp-roslyn/pull/2192)) -* Debugger changes: - * Added support for win10-arm64 debugging ([#3006](https://github.com/OmniSharp/omnisharp-vscode/issues/3006), PR: [#4672](https://github.com/OmniSharp/omnisharp-vscode/pull/4672)) - ### Emmet support in Razor files To enable emmet support, add the following to your settings.json: