Skip to content

Commit 0f0fcb0

Browse files
[automated] Merge branch 'main' => 'prerelease' (#8689)
2 parents 2c30c12 + fd32f01 commit 0f0fcb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5958
-131
lines changed

.github/copilot-instructions.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copilot Coding Agent Instructions for `vscode-csharp`
2+
3+
## Project Overview
4+
- This is the official C# extension for Visual Studio Code, supporting C# development via OmniSharp and Roslyn-based language servers.
5+
- The codebase is TypeScript/JavaScript, with some JSON and configuration files. It integrates with .NET components and external language servers.
6+
7+
## Architecture & Key Components
8+
- **src/**: Main extension source. Key subfolders:
9+
- `lsptoolshost/`: Hosts LSP (Language Server Protocol) logic, including Copilot integration (`copilot/`), Roslyn, and Razor support.
10+
- `omnisharp/`: Protocols and logic for OmniSharp-based language server.
11+
- `razor/`: Razor language support and configuration.
12+
- **Copilot Integration**:
13+
- `src/lsptoolshost/copilot/contextProviders.ts` and `relatedFilesProvider.ts` register C# context and related files providers for GitHub Copilot and Copilot Chat extensions.
14+
- The Roslyn Copilot language server is managed as a downloadable component (see `package.json` and `CONTRIBUTING.md`).
15+
16+
## Developer Workflows
17+
- **Build**: `npm run compile` (or use VS Code build task)
18+
- **Test**: `npm test` (runs Jest tests)
19+
- **Package**: `npm run package` (creates VSIX)
20+
- **Dependencies**: Use `gulp installDependencies` to fetch .NET/LS components
21+
- **Debugging**: See `docs/debugger/` for advanced .NET debugging, including runtime and external library debugging.
22+
- **Roslyn Copilot Language Server**: To update/test, see instructions in `CONTRIBUTING.md` (triggers pipeline, checks logs for install, etc.)
23+
24+
## Infrastructure Tasks
25+
- **Tasks Directory**: Build automation is in `tasks/` using Gulp. Key modules:
26+
- `testTasks.ts`: Test orchestration for unit/integration tests across components
27+
- `offlinePackagingTasks.ts`: VSIX packaging for different platforms (`vsix:release:package:*`)
28+
- `componentUpdateTasks.ts`: Automated updates for Roslyn Copilot components
29+
- `snapTasks.ts`: Version bumping and changelog management for releases
30+
- `gitTasks.ts`: Git operations for automated PR creation and branch management
31+
- **Adding New Tasks**: Create `.ts` file in `tasks/`, define `gulp.task()` functions, require in `gulpfile.ts`
32+
- **Task Patterns**: Use `projectPaths.ts` for consistent path references, follow existing naming conventions (`test:integration:*`, `vsix:*`, etc.)
33+
34+
## Project Conventions & Patterns
35+
- **TypeScript**: Follows strict linting (`.eslintrc.js`), including header/license blocks and camelCase filenames (except for interfaces and special files).
36+
- **Component Downloads**: Language servers and debuggers are downloaded at runtime; see `package.json` for URLs and install logic.
37+
- **Copilot Providers**: Use `registerCopilotContextProviders` and `registerCopilotRelatedFilesProvider` to extend Copilot context for C#.
38+
- **Testing**: Prefer integration tests over unit tests for features. Structure follows:
39+
- `test/lsptoolshost/integrationTests/` for Roslyn/LSP features
40+
- `test/omnisharp/omnisharpIntegrationTests/` for OmniSharp features
41+
- `test/razor/razorIntegrationTests/` for Razor features
42+
- Use `test/*/integrationTests/integrationHelpers.ts` for test setup utilities
43+
- Tests use Jest with VS Code test environment and require workspace test assets
44+
- Run with `npm run test:integration:*` commands (e.g., `npm run test:integration:csharp`)
45+
46+
## Integration Points
47+
- **GitHub Copilot**: Extension registers C# context and related files providers if Copilot/Copilot Chat extensions are present.
48+
- **Roslyn Language Server**: Managed as a downloadable component, versioned in `package.json` and updated via pipeline.
49+
- **OmniSharp**: Legacy support, also downloaded as a component.
50+
51+
## Examples
52+
- To add a new Copilot context provider: see `src/lsptoolshost/copilot/contextProviders.ts`.
53+
- To update Roslyn Copilot server: follow `CONTRIBUTING.md` > "Updating the Roslyn Copilot Language Server version".
54+
55+
## References
56+
- [README.md](../README.md): User-facing overview and features
57+
- [CONTRIBUTING.md](../CONTRIBUTING.md): Dev setup, packaging, and advanced workflows
58+
- [package.json](../package.json): Component download logic, scripts
59+
- [src/lsptoolshost/copilot/](../src/lsptoolshost/copilot/): Copilot integration logic
60+
61+
---
62+
For any unclear or incomplete sections, please provide feedback to improve these instructions.

.github/workflows/branch-snap.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
with:
1313
configuration_file_path: '.config/snap-flow.json'
1414

15-
create-pull-request:
15+
bump-main-version:
1616
if: github.ref == 'refs/heads/main'
1717
runs-on: ubuntu-latest
1818
steps:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# GitHub Copilot setup steps for the C# VS Code extension
2+
# This file configures the environment for the GitHub Copilot coding agent
3+
4+
name: "Copilot Setup Steps"
5+
6+
# Automatically run the setup steps when they are changed to allow for easy validation, and
7+
# allow manual testing through the repository's "Actions" tab
8+
on:
9+
workflow_dispatch:
10+
push:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
pull_request:
14+
paths:
15+
- .github/workflows/copilot-setup-steps.yml
16+
17+
jobs:
18+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
19+
copilot-setup-steps:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read # Read access to the repository contents (required for checkout)
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v5
27+
28+
# Install Node.js (required for TypeScript compilation and npm packages)
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: 'npm'
33+
34+
# Install .NET SDK (required for some build components and MSBuild tasks)
35+
- uses: actions/setup-dotnet@v4
36+
with:
37+
dotnet-version: '8.0.x'
38+
39+
# Install npm dependencies
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
# Install gulp globally (required for build tasks)
44+
- name: Install gulp
45+
run: npm install -g gulp
46+
47+
# Install vsce (needed for packaging tasks)
48+
- name: Install vsce
49+
run: npm install -g vsce
50+
51+
# Install server dependencies (needed for integration tests and running)
52+
- name: Install dependencies
53+
run: gulp installDependencies
54+
55+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update CHANGELOG
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# Runs every Tuesday at 9 PM Pacific Time (5 AM UTC Wednesday)
6+
- cron: '0 5 * * 3'
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update-changelog:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- name: Install roslyn-tools
21+
run: dotnet tool install -g Microsoft.RoslynTools --prerelease --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
22+
- name: Install NodeJS
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20.x'
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: Update CHANGELOG
29+
run: npx gulp updateChangelog
30+
- name: Create update PR
31+
uses: peter-evans/create-pull-request@v4
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
commit-message: Update ${{ github.ref_name }} CHANGELOG
35+
title: '[automated] Update ${{ github.ref_name }} CHANGELOG'
36+
branch: merge/update-${{ github.ref_name }}-changelog

.vscodeignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
!.razorDevKit/**
99
!.razoromnisharp/**
1010
!.razorExtension/**
11-
.rpt2_cache/**
11+
.azuredevops/**
1212
.config/**
1313
.devcontainer/**
1414
.github/**
@@ -22,8 +22,7 @@ src/**
2222
tasks/**
2323
test/**
2424
__mocks__/**
25-
jest.config.ts
26-
baseJestConfig.ts
25+
**/*.ts
2726
.prettierignore
2827
typings/**
2928
vsix/**
@@ -40,17 +39,13 @@ CODEOWNERS
4039
Directory.Build.props
4140
global.json
4241
NuGet.config
43-
gulpfile.ts
4442
!install.Lock
45-
ISSUE_TEMPLATE
4643
!README.md
4744
!CHANGELOG.md
4845
*.md
49-
CONTRIBUTING.md
5046
*.vscodeignore
5147
*.yml
5248
package-lock.json
53-
package.json
5449
tsconfig.json
5550
version.json
5651
wallaby.js

CHANGELOG.md

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,56 @@
33
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

6+
# 2.94.x
7+
* Add completion for razor components in settings (PR: [#8680](https://github.com/dotnet/vscode-csharp/pull/8680))
8+
* Add copilot instructions (PR: [#8676](https://github.com/dotnet/vscode-csharp/pull/8676))
9+
* Fix up changelog (PR: [#8677](https://github.com/dotnet/vscode-csharp/pull/8677))
10+
* Bump Razor to 10.0.0-preview.25503.1 (PR: [#8679](https://github.com/dotnet/vscode-csharp/pull/8679))
11+
* Ensure RazorVSInternalCompletionParams is used for serialization of completion requests (PR: [#12271](https://github.com/dotnet/razor/pull/12271))
12+
* Fix update changelog script (PR: [#8671](https://github.com/dotnet/vscode-csharp/pull/8671))
13+
* Update RoslynCopilot url to 18.0.797-alpha (PR: [#8652](https://github.com/OmniSharp/omnisharp-vscode/pull/8652))
14+
* Fix GH action (PR: [#8662](https://github.com/OmniSharp/omnisharp-vscode/pull/8662))
15+
* Adds a new GH action to update the CHANGELOG (PR: [#8658](https://github.com/OmniSharp/omnisharp-vscode/pull/8658))
16+
* Do not run legacy Razor tests in CI (PR: [#8656](https://github.com/OmniSharp/omnisharp-vscode/pull/8656))
17+
* Update third party notices for currently shipped version (PR: [#8653](https://github.com/OmniSharp/omnisharp-vscode/pull/8653))
18+
* Bump xamlTools to 18.0.11023.10 (PR: [#8669](https://github.com/dotnet/vscode-csharp/pull/8669))
19+
* Bump Roslyn to 5.1.0-1.25475.3 (PR: [#8665](https://github.com/dotnet/vscode-csharp/pull/8665))
20+
* Fix index out of bounds producing diagnostic in error recovery scenario (PR: [#80391](https://github.com/dotnet/roslyn/pull/80391))
21+
* Fix pp directives when converting block bodies to expression bodies (PR: [#80401](https://github.com/dotnet/roslyn/pull/80401))
22+
* Fix renaming of type parameters used in object creation expressions (PR: [#80403](https://github.com/dotnet/roslyn/pull/80403))
23+
* Add timing data for Proposal Adjuster fixers (PR: [#80406](https://github.com/dotnet/roslyn/pull/80406))
24+
* Update ManagedHotReloadLanguageServiceBridge.cs to avoid raising not implement exception when projects is empty (PR: [#80408](https://github.com/dotnet/roslyn/pull/80408))
25+
* Install roslyn-tools (PR: [#8663](https://github.com/dotnet/vscode-csharp/pull/8663))
26+
* Bump tar-fs from 2.1.3 to 2.1.4 (PR: [#8661](https://github.com/dotnet/vscode-csharp/pull/8661))
27+
* Add copilot setup steps (PR: [#8655](https://github.com/dotnet/vscode-csharp/pull/8655))
28+
* Update pipeline and packaging excludes (PR: [#8654](https://github.com/dotnet/vscode-csharp/pull/8654))
29+
* Add new telemetry fields (PR: [#8673](https://github.com/dotnet/vscode-csharp/pull/8673))
30+
* Bump Roslyn to 5.1.0-1.25506.3 (PR: [#8673](https://github.com/dotnet/vscode-csharp/pull/8673))
31+
* Improve error recovery when object initializer uses ':' instead of '=' (PR: [#80553](https://github.com/dotnet/roslyn/pull/80553))
32+
* Support `field` keyword in EE. (PR: [#80515](https://github.com/dotnet/roslyn/pull/80515))
33+
* Log a debug message for ContentModified exceptions. (PR: [#80549](https://github.com/dotnet/roslyn/pull/80549))
34+
* Update proposal adjuster to acquire feature flags from VS (PR: [#80541](https://github.com/dotnet/roslyn/pull/80541))
35+
* Add telemetry indicating when file-based programs are used (PR: [#80538](https://github.com/dotnet/roslyn/pull/80538))
36+
* Fix thread safety issue in BuildServerConnection.TryCreateServer environment variable handling (PR: [#80498](https://github.com/dotnet/roslyn/pull/80498))
37+
* Extensions: refine tracking of used imports (PR: [#80485](https://github.com/dotnet/roslyn/pull/80485))
38+
* Disambiguate extension methods in "ambiguous call" error message when they have the same name but are from different assemblies (PR: [#80453](https://github.com/dotnet/roslyn/pull/80453))
39+
* Block file-local EmbeddedAttribute definitions. (PR: [#80501](https://github.com/dotnet/roslyn/pull/80501))
40+
* Extension block members do not have `this` parameter (PR: [#80457](https://github.com/dotnet/roslyn/pull/80457))
41+
* Handle some scenarios where attributes applied in local functions or lambdas within extension blocks were missing in metadata (PR: [#80464](https://github.com/dotnet/roslyn/pull/80464))
42+
* Unset other DOTNET_ROOT env vars when launching apphosts (PR: [#80492](https://github.com/dotnet/roslyn/pull/80492))
43+
* Add friendlier error message on an explicit implementation when the return type is wrong (PR: [#8037](https://github.com/dotnet/roslyn/pull/80376)
44+
* Extensions: add Name property on embedded ExtensionMarkerAttribute (PR: [#80456](https://github.com/dotnet/roslyn/pull/80456))
45+
* Avoid implicit null checks while narrowing type for `or` patterns (PR: [#80348](https://github.com/dotnet/roslyn/pull/80348))
46+
647
# 2.93.x
748
* Bump Roslyn to 5.0.0-2.25472.11 (PR: [#8646](https://github.com/dotnet/vscode-csharp/pull/8646))
8-
* Fix handling edits in types nested in reloadable types(PR: [#80360](https://github.com/dotnet/roslyn/pull/80360))
9-
* Remove CS1998 warning entirely and remove dependent C# code fix providers(PR: [#80144](https://github.com/dotnet/roslyn/pull/80144))
10-
* Only restore based on assets file changes if the actual content changed(PR: [#80341](https://github.com/dotnet/roslyn/pull/80341))
49+
* Fix handling edits in types nested in reloadable types (PR: [#80360](https://github.com/dotnet/roslyn/pull/80360))
50+
* Remove CS1998 warning entirely and remove dependent C# code fix providers (PR: [#80144](https://github.com/dotnet/roslyn/pull/80144))
51+
* Only restore based on assets file changes if the actual content changed (PR: [#80341](https://github.com/dotnet/roslyn/pull/80341))
1152
* Fix issue where build artifacts were added in source tree (PR: [#80324](https://github.com/dotnet/roslyn/pull/80324))
12-
* Allow clients to send range ending at the line after the last line in the document(PR: [#80310](https://github.com/dotnet/roslyn/pull/80310))
13-
* Don't show Razor diagnostics in Full Solution Analysis(PR: [#80296](https://github.com/dotnet/roslyn/pull/80296))
14-
* Log project context in which document was found(PR: [#80202](https://github.com/dotnet/roslyn/pull/80202))
53+
* Allow clients to send range ending at the line after the last line in the document (PR: [#80310](https://github.com/dotnet/roslyn/pull/80310))
54+
* Don't show Razor diagnostics in Full Solution Analysis (PR: [#80296](https://github.com/dotnet/roslyn/pull/80296))
55+
* Log project context in which document was found (PR: [#80202](https://github.com/dotnet/roslyn/pull/80202))
1556
* Bump Razor to 10.0.0-preview.25472.6 (PR: [#8639](https://github.com/dotnet/vscode-csharp/pull/8639))
1657
* Support view components in Go To Def (PR: [#12222](https://github.com/dotnet/razor/pull/12222))
1758
* Redirect the older named assembly too (PR: [#12239](https://github.com/dotnet/razor/pull/12239))
@@ -26,10 +67,10 @@
2667

2768
# 2.91.x
2869
* Bump Roslyn to 5.0.0-2.25458.10 (PR: [#8588](https://github.com/dotnet/vscode-csharp/pull/8588))
29-
* Move brace adjustment on enter to on auto insert in LSP(PR: [#80075](https://github.com/dotnet/roslyn/pull/80075))
30-
* Avoid throwing when obsolete overload of GetUpdatesAsync is invoked with empty array(PR: [#80161](https://github.com/dotnet/roslyn/pull/80161))
31-
* Bump patch version of MSBuild packages(PR: [#80156](https://github.com/dotnet/roslyn/pull/80156))
32-
* Include category in Hot Reload log messages(PR: [#80160](https://github.com/dotnet/roslyn/pull/80160))
70+
* Move brace adjustment on enter to on auto insert in LSP (PR: [#80075](https://github.com/dotnet/roslyn/pull/80075))
71+
* Avoid throwing when obsolete overload of GetUpdatesAsync is invoked with empty array (PR: [#80161](https://github.com/dotnet/roslyn/pull/80161))
72+
* Bump patch version of MSBuild packages (PR: [#80156](https://github.com/dotnet/roslyn/pull/80156))
73+
* Include category in Hot Reload log messages (PR: [#80160](https://github.com/dotnet/roslyn/pull/80160))
3374
* Store client's version for open docs (PR: [#80064](https://github.com/dotnet/roslyn/pull/80064))
3475
* Pass global properties and the binary log path via RPC to BuildHost (PR: [#80094](https://github.com/dotnet/roslyn/pull/80094))
3576
* Don't switch runtime / design time solutions if cohosting is on (PR: [#80065](https://github.com/dotnet/roslyn/pull/80065))

0 commit comments

Comments
 (0)