版本发布 8
# 2.134.x * Add setting `dotnet.fileBasedApps.enableAutomaticDiscovery` (PR: [#9096](https://github.com/dotnet/vscode-csharp/pull/9096)) * Update Roslyn to 5.7.0-1.26203.6 (PR: [#9096](https://github.com/dotnet/vscode-csharp/pull/9096)) * File-based apps automatic discovery (PR: [#82863](https://github.com/dotnet/roslyn/pull/82863)) * Fix evaluations inside ref-returning methods (PR: [#83037](https://github.com/dotnet/roslyn/pull/83037)) * Fix with-element indentation in collection expressions on multiple lines (PR: [#83030](https://github.com/dotnet/roslyn/pull/83030)) * Do not crash if URI not parseable and no default handler exists (PR: [#83024](https://github.com/dotnet/roslyn/pull/83024)) * Allow generate method to run on Razor documents (PR: [#83028](https://github.com/dotnet/roslyn/pull/83028)) * Preserve #: file-based app directives during formatting (PR: [#82996](https://github.com/dotnet/roslyn/pull/82996)) * Move inheritance margin logic to a features service (PR: [#83001](https://github.com/dotnet/roslyn/pull/83001)) * Don't format plain blocks as member declaration blocks in top level code (PR: [#82976](https://github.com/dotnet/roslyn/pull/82976)) * Add LSP CallHierarchy support (PR: [#82865](https://github.com/dotnet/roslyn/pull/82865)) * Move CallHierarchy logic to the Features layer (PR: [#82864](https://github.com/dotnet/roslyn/pull/82864)) * Handle misc project having an AdditionalDocument and not a Document (PR: [#82956](https://github.com/dotnet/roslyn/pull/82956)) * Fix structure guideline anchor for initializer expressions with multi-line argument lists (PR: [#82946](https://github.com/dotnet/roslyn/pull/82946)) * Navigate to position instead of span for Go to Implementation (PR: [#82906](https://github.com/dotnet/roslyn/pull/82906)) * Only cache diagnostics for legacy projects (PR: [#82643](https://github.com/dotnet/roslyn/pull/82643)) * Improve classification of file-based app directives (PR: [#82627](https://github.com/dotnet/roslyn/pull/82627)) * Add support for skipping analyzing banned API analysis in generated files (PR: [#82713](https://github.com/dotnet/roslyn/pull/82713)) * Add regex search support to NavigateTo (PR: [#82706](https://github.com/dotnet/roslyn/pull/82706)) * Add completion provider for `#:include` directives (PR: [#82625](https://github.com/dotnet/roslyn/pull/82625)) * Modify SyntaxNode trivia search/walk methods to utilize green node checks (PR: [#82893](https://github.com/dotnet/roslyn/pull/82893)) * Fix handling of added import trivia (PR: [#82788](https://github.com/dotnet/roslyn/pull/82788)) * DeterministicKeyBuilder: deduplicate ParseOptions across SyntaxTrees (PR: [#82895](https://github.com/dotnet/roslyn/pull/82895)) * Fix InvalidCastException in split-if refactoring for top-level statements (PR: [#82807](https://github.com/dotnet/roslyn/pull/82807))
# 2.114.x * Adjust Select Project Context editor menu item location (PR: [#8907](https://github.com/dotnet/vscode-csharp/pull/8907)) * Replace vsts-npm-auth with ado-npm-auth in documentation and scripts (PR: [#8906](https://github.com/dotnet/vscode-csharp/pull/8906)) * Clarify vsts-npm-auth only required when adding new packages (PR: [#8850](https://github.com/dotnet/vscode-csharp/pull/8850)) * Update Razor to 10.0.0-preview.26075.11 (PR: [#8914](https://github.com/dotnet/vscode-csharp/pull/8914)) * Add IndentByTwo attribute indent style option for Razor formatting (PR: [#12700](https://github.com/dotnet/razor/pull/12700)) * Fix ordering logic for folding ranges, to fix expression bodied method folding (PR: [#12695](https://github.com/dotnet/razor/pull/12695)) * Update Roslyn to 5.4.0-2.26076.6 (PR: [#8921](https://github.com/dotnet/vscode-csharp/pull/8921)) * [EnC] Use default encoding stored in the PDB for creating committed document SourceText (PR: [#81912](https://github.com/dotnet/roslyn/pull/81912)) * Fix setting checksum algorithm when mapping projects (PR: [#82051](https://github.com/dotnet/roslyn/pull/82051)) * Fix race in AbstractFormatEngine.GetChainedFormattingRules (PR: [#82079](https://github.com/dotnet/roslyn/pull/82079)) * Fix crash when seeing if code can be converted to collection expressions (PR: [#82104](https://github.com/dotnet/roslyn/pull/82104)) * feat: foreach completion (PR: [#81850](https://github.com/dotnet/roslyn/pull/81850)) * Use document structure in breadcrumbs, sticky scroll, and outline in VSCode (PR: [#81993](https://github.com/dotnet/roslyn/pull/81993)) * Keep comments when converting coalesce expressions (PR: [#82062](https://github.com/dotnet/roslyn/pull/82062)) * Adds an analyzer/fixer to inform the user when the compiler silently inserts a fallible explicit cast. (PR: [#82039](https://github.com/dotnet/roslyn/pull/82039)) * Don't offer "Use coalesce expression" when if-statement contains directives (PR: [#82041](https://github.com/dotnet/roslyn/pull/82041)) * Fix detection of embedded c# code (PR: [#82033](https://github.com/dotnet/roslyn/pull/82033)) * Fix issue with 'remove unnecessary suppression' and field/property initializers (PR: [#81899](https://github.com/dotnet/roslyn/pull/81899)) * Extensions: RemovedUnusedMembers should analyze symbol usages within extension blocks too (PR: [#81996](https://github.com/dotnet/roslyn/pull/81996)) * Don't offer 'use ??' when pointers are involved (PR: [#81988](https://github.com/dotnet/roslyn/pull/81988)) * Add 'find references' support for collection-expression-builder methods. (PR: [#81770](https://github.com/dotnet/roslyn/pull/81770)) * Support inference in collection expressions (PR: [#77534](https://github.com/dotnet/roslyn/pull/77534))
# 2.113.x * Add explorer context menu item for changing project context (PR: [#8896](https://github.com/dotnet/vscode-csharp/pull/8896)) * Small fixes for project context selector (PR: [#8889](https://github.com/dotnet/vscode-csharp/pull/8889)) * Update Razor to 10.0.0-preview.26066.2 (PR: [#8894](https://github.com/dotnet/vscode-csharp/pull/8894)) * Ignore case when parsing enum values in settings in VS Code (PR: [#12667](https://github.com/dotnet/razor/pull/12667))
# 2.112.x * Add project context refresh support (PR: [#8876](https://github.com/dotnet/vscode-csharp/pull/8876)) * Add ability to select a document's project context (PR: [#7328](https://github.com/dotnet/vscode-csharp/pull/7328)) * Fix TFM detection for .NET 10+ to enable launch.json generation (PR: [#8873](https://github.com/dotnet/vscode-csharp/pull/8873)) * Fix JavaScript highlighting in Razor files after C# control structures without braces (PR: [#8865](https://github.com/dotnet/vscode-csharp/pull/8865)) * Update Razor to 10.0.0-preview.26059.2 (PR: [#8877](https://github.com/dotnet/vscode-csharp/pull/8877)) * Encode double slash as underscore slash in hint names (PR: [#12597](https://github.com/dotnet/razor/pull/12597)) * Navigate to a Razor file when GTD/FAR/GTI is run in C# on the class name (PR: [#12580](https://github.com/dotnet/razor/pull/12580)) * Fix rename of components in the global namespace (PR: [#12577](https://github.com/dotnet/razor/pull/12577)) * Return a document symbol representing the "Render" method for a Razor file (PR: [#12568](https://github.com/dotnet/razor/pull/12568)) * Filter our html diagnostics when a tag helper attribute spans multiple lines (PR: [#12654](https://github.com/dotnet/razor/pull/12654)) * Handle Html indentation ourselves, rather than using the IDE formatter (PR: [#12623](https://github.com/dotnet/razor/pull/12623)) * Add new option to control attribute indent style (PR: [#12625](https://github.com/dotnet/razor/pull/12625)) * Fix formatting with adjacent C# templates (PR: [#12636](https://github.com/dotnet/razor/pull/12636)) * Emit the start of multiline implicit expressions the same as explicit. (PR: [#12624](https://github.com/dotnet/razor/pull/12624)) * Rename a .razor file when Roslyn renames the component type name (PR: [#12606](https://github.com/dotnet/razor/pull/12606)) * Rename component tags and type references when a Razor file is renamed (PR: [#12561](https://github.com/dotnet/razor/pull/12561)) * Handle conflict markers (PR: [#12642](https://github.com/dotnet/razor/pull/12642)) * Fix cross project span and edit mapping (PR: [#12614](https://github.com/dotnet/razor/pull/12614)) * Update Roslyn to 5.4.0-2.26062.9 (PR: [#7328](https://github.com/dotnet/vscode-csharp/pull/7328)) * Add a notification handler for project context changed. (PR: [#81942](https://github.com/dotnet/roslyn/pull/81942)) * Ensure IDE does not use .editorconfig for source generated files (PR: [#81911](https://github.com/dotnet/roslyn/pull/81911)) * Send a key across identifying contents of the project context list (PR: [#81940](https://github.com/dotnet/roslyn/pull/81940)) * Include Enc diagnostics in Razor requests (PR: [#81941](https://github.com/dotnet/roslyn/pull/81941)) * Fix completions after attribute list in lambdas (PR: [#81961](https://github.com/dotnet/roslyn/pull/81961)) * Add ProjectContext refresh queue (PR: [#81938](https://github.com/dotnet/roslyn/pull/81938)) * Add back async fixers (PR: [#81835](https://github.com/dotnet/roslyn/pull/81835)) * Fix crash in convert-if-to-switch (PR: [#81724](https://github.com/dotnet/roslyn/pull/81724)) * Add code-folding/structure-guides/sticky-scroll support for extension blocks (PR: [#81667](https://github.com/dotnet/roslyn/pull/81667)) * Improve go-to-def in situations where compiler returns multiple candidates. (PR: [#81583](https://github.com/dotnet/roslyn/pull/81583)) * Add willRenameFiles support, and an abstraction for extenders to implement (PR: [#81549](https://github.com/dotnet/roslyn/pull/81549)) * Support `// lang=c#` along with `// lang=c#-test` (PR: [#81558](https://github.com/dotnet/roslyn/pull/81558))
# 2.111.x * Update extension to run on .NET 10 (PR: [#8839](https://github.com/dotnet/vscode-csharp/pull/8839)) * Update Roslyn to 5.3.0-2.25604.5 (PR: [#8839](https://github.com/dotnet/vscode-csharp/pull/)) * Build our libraries against net10.0 (PR: [#81545](https://github.com/dotnet/roslyn/pull/81545)) * Update Roslyn LSP server to .net10 (PR: [#81508](https://github.com/dotnet/roslyn/pull/81508)) * Fix InvalidCastException in ConvertForToForEach with tuples (PR: [#81531](https://github.com/dotnet/roslyn/pull/81531)) * Update Razor to 10.0.0-preview.25608.3 (PR: [#8844](https://github.com/dotnet/vscode-csharp/pull/8844)) * Update C# code when Razor components are renamed (PR: [#12534](https://github.com/dotnet/razor/pull/12534)) * Ensure formatting can't change string literal contents (PR: [#12556](https://github.com/dotnet/razor/pull/12556))
# 2.103.x * include roslyn event source configs in profiling command (PR: [#8808](https://github.com/dotnet/vscode-csharp/pull/8808)) * Revise SUPPORT.md for clarity on sharing information (PR: [#8807](https://github.com/dotnet/vscode-csharp/pull/8807)) * Fix indentation after pressing Enter in Razor files (PR: [#8809](https://github.com/dotnet/vscode-csharp/pull/8809)) * Remove non-cohosting editor code (PR: [#8810](https://github.com/dotnet/vscode-csharp/pull/8810)) * Bump Razor to 10.0.0-preview.25577.1 (PR: [#8820](https://github.com/dotnet/vscode-csharp/pull/8820)) * Explicitly handle switch expressions in parser (PR: [#12500](https://github.com/dotnet/razor/pull/12500)) * Bring back Go to Def, FAR and hover for components via Roslyn (PR: [#12501](https://github.com/dotnet/razor/pull/12501)) * Don't add newlines at the start of implicit expressions in on type formatting (PR: [#12489](https://github.com/dotnet/razor/pull/12489)) * Add the RazorCSharp keywords to completion (PR: [#12522](https://github.com/dotnet/razor/pull/12522)) * Remove non-cohost bits from C# extension (PR: [#12518](https://github.com/dotnet/razor/pull/12518)) * Update Roslyn to 5.3.0-2.25571.4 (PR: [#8813](https://github.com/dotnet/vscode-csharp/pull/8813)) * Fix typing of 'else' causing unwanted indentation of following statement (PR: [#81393](https://github.com/dotnet/roslyn/pull/81393)) * Show semantic errors for loose files with top-level statements (PR: [#81326](https://github.com/dotnet/roslyn/pull/81326)) * Simplify and fix fading options. (PR: [#81346](https://github.com/dotnet/roslyn/pull/81346)) * Colorization for array, pointer, and function pointer type aliases followup (PR: [#81363](https://github.com/dotnet/roslyn/pull/81363)) * Fix: Support compound assignments in "Use null propagation" analyzer (PR: [#81328](https://github.com/dotnet/roslyn/pull/81328)) * Fix IDE0032: Code fixer adds setter for static properties with instance constructor writes (PR: [#81327](https://github.com/dotnet/roslyn/pull/81327)) * Add 'add extension completion' support for modern extensions. (PR: [#81239](https://github.com/dotnet/roslyn/pull/81239)) * Add second opt-out flag for file-based programs (PR: [#8823](https://github.com/dotnet/vscode-csharp/pull/8823)) * Update Roslyn to 5.3.0-2.25603.1 (PR: [#8823](https://github.com/dotnet/vscode-csharp/pull/8823)) * Improve error message for misplaced variable designator in property patterns (PR: [#81287](https://github.com/dotnet/roslyn/pull/81287)) * Add EnableFileBasedProgramsWhenAmbiguous flag (PR: [#81513](https://github.com/dotnet/roslyn/pull/81513)) * Include extension properties in object initializer completion (PR: [#81498](https://github.com/dotnet/roslyn/pull/81498)) * Fix IDE0048 to trigger consistently for `is null` and `is not null` in coalesce expressions (PR: [#81489](https://github.com/dotnet/roslyn/pull/81489)) * Do not offer to add a `using namespace` on an alias qualified name. (PR: [#81487](https://github.com/dotnet/roslyn/pull/81487)) * Add code refactoring to offer usings for fully qualified names (PR: [#81484](https://github.com/dotnet/roslyn/pull/81484)) * Fix RemoveUnusedMembers handling of default parameter reads (PR: [#80810](https://github.com/dotnet/roslyn/pull/80810)) * Fix exception in InlineMethodRefactoringProvider for recursive calls (PR: [#81469](https://github.com/dotnet/roslyn/pull/81469)) * Fix issue where we weren't offering snippets inline after an expression (PR: [#81466](https://github.com/dotnet/roslyn/pull/81466)) * Follow user naming preferences when generating type snippets (PR: [#81465](https://github.com/dotnet/roslyn/pull/81465)) * Fix 'use var' with forr/for snippets (PR: [#81464](https://github.com/dotnet/roslyn/pull/81464)) * Map edits in LSP rename, like in VS (PR: [#81450](https://github.com/dotnet/roslyn/pull/81450)) * Remove more unused bits of Razor EA (PR: [#81452](https://github.com/dotnet/roslyn/pull/81452)) * Fix for-snippet not simplifying (PR: [#81461](https://github.com/dotnet/roslyn/pull/81461)) * Fix duplicate parameter names in introduce parameter refactoring (PR: [#81404](https://github.com/dotnet/roslyn/pull/81404)) * Fade out portion of linq expression that can be simplified (PR: [#81419](https://github.com/dotnet/roslyn/pull/81419)) * Improve LSP conformance in MS.CA.LanguageServer (PR: [#81174](https://github.com/dotnet/roslyn/pull/81174)) * Improve 'else' indentation in a couple more cases (PR: [#81411](https://github.com/dotnet/roslyn/pull/81411))
# 2.100.x * See 2.97.x for full list of changes.
# 2.93.x * Bump Roslyn to 5.0.0-2.25472.11 (PR: [#8646](https://github.com/dotnet/vscode-csharp/pull/8646)) * Fix handling edits in types nested in reloadable types(PR: [#80360](https://github.com/dotnet/roslyn/pull/80360)) * Remove CS1998 warning entirely and remove dependent C# code fix providers(PR: [#80144](https://github.com/dotnet/roslyn/pull/80144)) * Only restore based on assets file changes if the actual content changed(PR: [#80341](https://github.com/dotnet/roslyn/pull/80341)) * Fix issue where build artifacts were added in source tree (PR: [#80324](https://github.com/dotnet/roslyn/pull/80324)) * 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)) * Don't show Razor diagnostics in Full Solution Analysis(PR: [#80296](https://github.com/dotnet/roslyn/pull/80296)) * Log project context in which document was found(PR: [#80202](https://github.com/dotnet/roslyn/pull/80202)) * Bump Razor to 10.0.0-preview.25472.6 (PR: [#8639](https://github.com/dotnet/vscode-csharp/pull/8639)) * Support view components in Go To Def (PR: [#12222](https://github.com/dotnet/razor/pull/12222)) * Redirect the older named assembly too (PR: [#12239](https://github.com/dotnet/razor/pull/12239)) * Restore "Show Html/C#" VS Code commands (PR: [#12234](https://github.com/dotnet/razor/pull/12234))