Skip to content

color #9739

Description

@tjjacks

Type: Bug

Issue Description

Steps to Reproduce

Expected Behavior

Actual Behavior

Extension version: 2.140.9
VS Code version: Code 1.136.1 (a44adf7f53e00964ab890f9f8758a334f1fc15bc, 2026-09-03T05:06:41Z)
OS version: Windows_NT x64 10.0.26200
Modes:

Logs

C# log

Details
2026-09-07 12:47:51.941 [info] Locating .NET runtime version 10.0.5
2026-09-07 12:47:53.152 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2026-09-07 12:47:53.152 [info] Activating C# + C# Dev Kit...
2026-09-07 12:47:55.943 [info] info: Program[0]
2026-09-07 12:47:55.943 [info]       Server started with process ID 13940
2026-09-07 12:47:58.811 [info] [Program] Language server initialized
2026-09-07 12:47:58.813 [info] [Program] Monitoring client process 16708 for exit
2026-09-07 12:48:01.707 [info] [initialized] [Microsoft.CodeAnalysis.LanguageServer.FileBasedPrograms.FileBasedProgramsEntryPointDiscovery] Finished discovery in 'c:\Users\tjj2\Field Notes project' in 75 milliseconds
2026-09-07 12:48:23.522 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\tjj2\Field Notes project\FieldNotes\FieldNotes.csproj loaded by C# Dev Kit
2026-09-07 12:48:23.551 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\tjj2\Field Notes project\FieldNotes\FieldNotes.csproj loaded by C# Dev Kit
2026-09-07 12:48:23.566 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\tjj2\Field Notes project\FieldNotes\FieldNotes.csproj loaded by C# Dev Kit
2026-09-07 12:48:23.584 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\tjj2\Field Notes project\FieldNotes\FieldNotes.csproj loaded by C# Dev Kit
2026-09-07 13:56:23.574 [info] [textDocument/didSave] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from c:\Users\tjj2\.vscode\extensions\ms-dotnettools.csharp-2.140.9-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.exe reloading to start from C:\Program Files\dotnet\dotnet.exe to match necessary SDK location.
2026-09-07 13:56:26.438 [warning] [textDocument/didSave] [LanguageServerProjectLoader] Project C:\Users\tjj2\AppData\Local\Temp\roslyn-canonical-misc\166ce57e-748a-4ae9-b543-b549c3d6614a\Canonical.csproj has unresolved dependencies
2026-09-07 13:56:26.696 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Services\SprjPackage.cs
2026-09-07 13:56:26.726 [info] [textDocument/didSave] [LanguageServerProjectLoader] Restoring Canonical.csproj: Running dotnet restore on C:\Users\tjj2\AppData\Local\Temp\roslyn-canonical-misc\166ce57e-748a-4ae9-b543-b549c3d6614a\Canonical.csproj
2026-09-07 13:56:26.727 [info] [textDocument/didSave] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2026-09-07 13:56:29.596 [info] [textDocument/didSave] [LanguageServerProjectLoader] Restoring Canonical.csproj:   Determining projects to restore...
2026-09-07 13:56:30.569 [info] [textDocument/didSave] [LanguageServerProjectLoader] Restoring Canonical.csproj:   Restored C:\Users\tjj2\AppData\Local\Temp\roslyn-canonical-misc\166ce57e-748a-4ae9-b543-b549c3d6614a\Canonical.csproj (in 170 ms).
2026-09-07 13:56:30.693 [info] [textDocument/didSave] [LanguageServerProjectLoader] Restore complete
2026-09-07 13:56:30.694 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:07.7893993
2026-09-07 13:56:31.104 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Services\SprjPackage.cs
2026-09-07 13:56:31.105 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0252168
2026-09-07 14:05:11.686 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\AppData\Local\Temp\sprj-test\Program.cs
2026-09-07 14:05:11.686 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0294476
2026-09-07 14:05:12.521 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\tjj2\AppData\Local\Temp\sprj-test\sprj-test.csproj loaded by C# Dev Kit
2026-09-07 14:05:50.542 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\AppData\Local\Temp\sprj-test\Program.cs
2026-09-07 14:05:50.542 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0114498
2026-09-07 14:05:51.006 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\AppData\Local\Temp\sprj-test\Program.cs
2026-09-07 14:05:51.006 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0161066
2026-09-07 14:06:02.541 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\AppData\Local\Temp\sprj-test\GlobalUsings.cs
2026-09-07 14:06:02.541 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0191344
2026-09-07 14:06:02.894 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\AppData\Local\Temp\sprj-test\GlobalUsings.cs
2026-09-07 14:06:02.895 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0104238
2026-09-07 15:29:01.700 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Services\SprjXlsxExport.cs
2026-09-07 15:29:01.701 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0515043
2026-09-07 15:29:02.174 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Services\SprjXlsxExport.cs
2026-09-07 15:29:02.175 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0330782
2026-09-07 15:29:35.283 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Platforms\Windows\SprjFileAssociation.cs
2026-09-07 15:29:35.283 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0189327
2026-09-07 15:29:35.668 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Platforms\Windows\SprjFileAssociation.cs
2026-09-07 15:29:35.668 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0114482
2026-09-07 15:31:59.292 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\AppData\Local\Temp\sprj-xlsx-test\Program.cs
2026-09-07 15:31:59.292 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0256879
2026-09-07 15:32:00.592 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\tjj2\AppData\Local\Temp\sprj-xlsx-test\sprj-xlsx-test.csproj loaded by C# Dev Kit
2026-09-07 17:16:22.220 [info] [textDocument/didSave] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Converters\ProjectPathConverter.cs
2026-09-07 17:16:22.220 [info] [textDocument/didSave] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0374117
2026-09-07 17:16:22.697 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Successfully completed load of c:\Users\tjj2\Field Notes project\FieldNotes\Converters\ProjectPathConverter.cs
2026-09-07 17:16:22.697 [info] [workspace/didChangeWatchedFiles] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:00.0093420
2026-09-07 17:17:07.266 [error] [textDocument/documentColor] [LSP] System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.LanguageService.Adornments.XamlColorTagCollector.GetColorsAsync(IXamlTree xamlTree, ColorScope colorScope, CancellationToken token)
   at Microsoft.VisualStudio.DesignTools.CodeAnalysis.Handlers.Color.XamlColorHandler.GetColorsAsync(IXamlResourceService resourceService, IXamlTree xamlTree, SourceText text, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.DesignTools.CodeAnalysis.Handlers.Color.XamlColorHandler.HandleRequestAsync(DocumentColorParams request, XamlRequestContext context, CancellationToken cancellationToken)
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken)
2026-09-07 17:17:07.272 [error] Request textDocument/documentColor failed.
  Message: Object reference not set to an instance of an object.
  Code: -32000 
[object Object]

C# LSP Trace Logs log

Details

Environment Information

VSCode version: 1.136.1
C# Extension: 2.140.9
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 10.0.301 Commit: 96856fd726 Workload version: 10.0.300-manifests.8c7d7c03 MSBuild version: 18.6.4+96856fd72

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.301\

.NET workloads installed:
[maui-windows]
Installation Source: VS 18.7.11911.148
Manifest Version: 10.0.20/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.maui\10.0.20\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 18.7.11911.148
Manifest Version: 26.5.10284/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.maccatalyst\26.5.10284\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 18.7.11911.148
Manifest Version: 26.5.10284/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.ios\26.5.10284\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 18.7.11911.148
Manifest Version: 36.1.43/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.android\36.1.43\WorkloadManifest.json
Install Type: Msi

Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.9
Architecture: x64
Commit: 901ca94124

.NET SDKs installed:
10.0.301 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.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:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_MULTILEVEL_LOOKUP [0]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
csdevkit ms-dotnettools 3.20.199 ms-dotnettools.csdevkit-3.20.199-win32-x64
csharp ms-dotnettools 2.140.9 ms-dotnettools.csharp-2.140.9-win32-x64
dart-code Dart-Code 3.142.0 dart-code.dart-code-3.142.0
dotnet-maui ms-dotnettools 1.16.88 ms-dotnettools.dotnet-maui-1.16.88-win32-x64
flutter Dart-Code 3.142.0 dart-code.flutter-3.142.0
vscode-dotnet-runtime ms-dotnettools 3.1.0 ms-dotnettools.vscode-dotnet-runtime-3.1.0
C# Settings
Setting Value
preferCSharpExtension false
compilerDiagnosticScope openFiles
analyzerDiagnosticScope openFiles
enableXamlTools true
useServerGC true
System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i3-1315U (8 x 2496)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0xa7a9 [Intel(R) UHD Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.7076 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8972
Machine model name:
Machine model version:
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
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.63GB (4.88GB free)
Process Argv --crash-reporter-id d75c1c22-4898-42b3-add1-3191bcec350e
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
4f60g487:31327383
envsactivate1:31551504
editstats-enabled:31346257
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
56b7f661:31457055
ec5jj548:31422691
diffpatch-lysithea-24-production:31579328
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
c9b86496:31447327
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ddid_t:31478206
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
gf14b233:31526830
ahp-both-windows:31556933
ihg5j128:31534457
9gg7f176:31542112
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
switchtoauto:31559321
0c1h4866:31566224
vrbsty_fls:31561059
session-mark-done:31558131
5b8j3302:31564601
mangle-name-treatment:31572634
signed-out-control:31574474
multiv2:31574985
2bfb8b39:31576696
permission_prompt_treatment:1332566
ccr_pr_nudge_adoption:1319471
vsc_wsm_t:1340632
jidc7660:1370295
auto_mode_treatment:1367907
cfee5631:1379228

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions