You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The formatter is now removing indentation automatically in many cases. This started happening today after updating to the latest version of the extension. Indentation works properly if I disable the extension.
Left side is the old behavior.
Right side is the new behavior.
In the video I'm creating a new line, then hitting Ctrl + Z to reverse it. You can clearly see that in the new behavior, the indentation comes back after hitting Ctrl + Z, indicating that it was there from the start, but then it was removed automatically.
20251009-0806-50.1815800.mp4
Steps to Reproduce
Create a new line inside of a class instance, or when defining enums. It happens elsewhere as well, but those are two easy ways to reproduce.
Expected Behavior
Indentation should be respected.
Actual Behavior
Indentation is completely removed.
Extension version: 2.93.22
VS Code version: Code 1.104.3 (385651c938df8a906869babee516bffd0ddb9829, 2025-10-02T12:30:51.747Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Logs
C# log
Details
2025-10-09 10:10:26.409 [info] Locating .NET runtime version 9.0.1
2025-10-09 10:10:27.309 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2025-10-09 10:10:27.309 [info] Activating C# + C# Dev Kit...
2025-10-09 10:10:27.774 [info] [stdout] info: Program[0]
Server started with process ID 26564
2025-10-09 10:10:28.461 [info] [stdout] fail: Microsoft.CodeAnalysis.Remote.ExportProviderBuilder[0]
Encountered errors in the MEF composition:
----- CompositionError level 1 ------
Microsoft.VisualStudio.Copilot.Roslyn.Completion.CSharpReferencedSymbolDefinitionSnippetProvider.ctor(joinableTaskContext): expected exactly 1 export matching constraints:
Contract name: Microsoft.VisualStudio.Threading.JoinableTaskContext
TypeIdentityName: Microsoft.VisualStudio.Threading.JoinableTaskContext
but found 0.
part definition Microsoft.VisualStudio.Copilot.Roslyn.Completion.CSharpReferencedSymbolDefinitionSnippetProvider
Microsoft.VisualStudio.Copilot.Roslyn.Completion.CSharpMemberAccessSymbolBlueprintProvider.ctor(joinableTaskContext): expected exactly 1 export matching constraints:
Contract name: Microsoft.VisualStudio.Threading.JoinableTaskContext
TypeIdentityName: Microsoft.VisualStudio.Threading.JoinableTaskContext
but found 0.
part definition Microsoft.VisualStudio.Copilot.Roslyn.Completion.CSharpMemberAccessSymbolBlueprintProvider
Microsoft.VisualStudio.Copilot.Roslyn.Completion.CSharpMethodCallerBlueprintProvider.ctor(joinableTaskContext): expected exactly 1 export matching constraints:
Contract name: Microsoft.VisualStudio.Threading.JoinableTaskContext
TypeIdentityName: Microsoft.VisualStudio.Threading.JoinableTaskContext
but found 0.
part definition Microsoft.VisualStudio.Copilot.Roslyn.Completion.CSharpMethodCallerBlueprintProvider
Microsoft.CodeAnalysis.ExternalAccess.Copilot.Internal.SemanticSearch.CopilotSemanticSearchQueryExecutor.ctor(workspaceProvider): expected exactly 1 export matching constraints:
Contract name: Microsoft.CodeAnalysis.Host.IHostWorkspaceProvider
TypeIdentityName: Microsoft.CodeAnalysis.Host.IHostWorkspaceProvider
but found 0.
part definition Microsoft.CodeAnalysis.ExternalAccess.Copilot.Internal.SemanticSearch.CopilotSemanticSearchQueryExecutor
Microsoft.CodeAnalysis.ExternalAccess.Copilot.Internal.CodeMapper.CSharpMapCodeService.ctor(service): expected exactly 1 export matching constraints:
Contract name: Microsoft.CodeAnalysis.ExternalAccess.Copilot.CodeMapper.ICSharpCopilotMapCodeService
TypeIdentityName: Microsoft.CodeAnalysis.ExternalAccess.Copilot.CodeMapper.ICSharpCopilotMapCodeService
but found 0.
part definition Microsoft.CodeAnalysis.ExternalAccess.Copilot.Internal.CodeMapper.CSharpMapCodeService
Microsoft.CodeAnalysis.ExternalAccess.Pythia.PythiaSignatureHelpProvider.ctor(implementation): expected exactly 1 export matching constraints:
Contract name: Microsoft.CodeAnalysis.ExternalAccess.Pythia.Api.IPythiaSignatureHelpProviderImplementation
TypeIdentityName: Microsoft.CodeAnalysis.ExternalAccess.Pythia.Api.IPythiaSignatureHelpProviderImplementation
but found 0.
part definition Microsoft.CodeAnalysis.ExternalAccess.Pythia.PythiaSignatureHelpProvider
Microsoft.VisualStudio.Composition.CompositionFailedException: Errors exist in the composition.
at Microsoft.VisualStudio.Composition.CompositionConfiguration.ThrowOnErrors()
at Microsoft.CodeAnalysis.Remote.ExportProviderBuilder.CheckForAndReportCompositionErrors(CompositionConfiguration configuration, ComposableCatalog catalog) in /_/src/Workspaces/Remote/Core/ExportProviderBuilder.cs:line 208
2025-10-09 10:10:29.473 [info] [stdout] {"pipeName":"\\\\.\\pipe\\82d88b9b"}
2025-10-09 10:10:29.473 [info] received named pipe information from server
2025-10-09 10:10:29.501 [info] client has connected to server
2025-10-09 10:10:29.538 [info] [Program] Language server initialized
2025-10-09 10:10:30.239 [info] [textDocument/_vs_getProjectContexts] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2025-10-09 10:10:30.636 [info] [textDocument/_vs_getProjectContexts] [Microsoft.CodeAnalysis.LanguageServer.FileBasedPrograms.FileBasedProgramsProjectSystem] Failed to obtain virtual project for 'c:\Private\Projects\EPiBackend\NWG.Commerce\Data\Export\ApiExport.cs' using dotnet run-api. Falling back to directly creating the virtual project.
2025-10-09 10:10:31.292 [info] [textDocument/_vs_getProjectContexts] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from c:\Users\stnalwu1\.vscode\extensions\ms-dotnettools.csharp-2.93.22-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.exe reloading to start from C:\Program Files\dotnet\dotnet.exe to match necessary SDK location.
2025-10-09 10:10:33.009 [warning] [textDocument/_vs_getProjectContexts] [LanguageServerProjectLoader] Project c:\Private\Projects\EPiBackend\NWG.Commerce\Data\Export\ApiExport.csproj has unresolved dependencies
2025-10-09 10:10:33.082 [info] [textDocument/_vs_getProjectContexts] [LanguageServerProjectLoader] Successfully completed load of c:\Private\Projects\EPiBackend\NWG.Commerce\Data\Export\ApiExport.cs
2025-10-09 10:10:33.364 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.WebJob\NWG.Commerce.WebJob.csproj loaded by C# Dev Kit
2025-10-09 10:10:33.373 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce\NWG.Commerce.csproj loaded by C# Dev Kit
2025-10-09 10:10:33.489 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Azure\NWG.Azure.csproj loaded by C# Dev Kit
2025-10-09 10:10:33.538 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.WebJob.Shared\NWG.Commerce.WebJob.Shared.csproj loaded by C# Dev Kit
2025-10-09 10:10:33.810 [error] [workspace/_roslyn_restore] [Microsoft.CodeAnalysis.LanguageServer.Handler.RestoreHandler] Restore completed with errors.
2025-10-09 10:10:33.812 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.Identity\NWG.Commerce.Identity.csproj loaded by C# Dev Kit
2025-10-09 10:10:33.815 [info] [textDocument/_vs_getProjectContexts] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:03.6016525
2025-10-09 10:10:34.076 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.Microshop\NWG.Commerce.Microshop.csproj loaded by C# Dev Kit
2025-10-09 10:10:34.204 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.Test\NWG.Commerce.Test.csproj loaded by C# Dev Kit
2025-10-09 10:10:34.436 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.Api\NWG.Commerce.Api.csproj loaded by C# Dev Kit
2025-10-09 10:10:34.447 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.Commerce.ReturnCenter\NWG.Commerce.ReturnCenter.csproj loaded by C# Dev Kit
2025-10-09 10:10:34.699 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Private\Projects\EPiBackend\NWG.CommerceFunction\NWG.CommerceFunction.csproj loaded by C# Dev Kit
C# LSP Trace Logs log
Details
Environment Information
VSCode version: 1.104.3 C# Extension: 2.93.22 Using OmniSharp: false
Type: Bug
Issue Description
The formatter is now removing indentation automatically in many cases. This started happening today after updating to the latest version of the extension. Indentation works properly if I disable the extension.
Left side is the old behavior.
Right side is the new behavior.
In the video I'm creating a new line, then hitting
Ctrl + Zto reverse it. You can clearly see that in the new behavior, the indentation comes back after hittingCtrl + Z, indicating that it was there from the start, but then it was removed automatically.20251009-0806-50.1815800.mp4
Steps to Reproduce
Create a new line inside of a class instance, or when defining enums. It happens elsewhere as well, but those are two easy ways to reproduce.
Expected Behavior
Indentation should be respected.
Actual Behavior
Indentation is completely removed.
Extension version: 2.93.22
VS Code version: Code 1.104.3 (385651c938df8a906869babee516bffd0ddb9829, 2025-10-02T12:30:51.747Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Logs
C# log
Details
C# LSP Trace Logs log
Details
Environment Information
VSCode version: 1.104.3
C# Extension: 2.93.22
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 9.0.305 Commit: 3fc74f3529 Workload version: 9.0.300-manifests.6fcb754b MSBuild version: 17.14.21+8929ca9e3Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.305\
.NET workloads installed:
[aspire]
Installation Source: VS 17.14.36518.9
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.9
Architecture: x64
Commit: 893c2ebbd4
.NET SDKs installed:
6.0.428 [C:\Program Files\dotnet\sdk]
9.0.305 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
C# Settings
System Info
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off