2026-04-19 15:41:59.626 [info] Locating .NET runtime version 10.0.5
2026-04-19 15:42:01.110 [info] Dotnet path: c:\Users\eriks\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\10.0.5~x64~aspnetcore\dotnet.exe
2026-04-19 15:42:01.110 [info] Activating C# + C# Dev Kit...
2026-04-19 15:42:01.356 [info] info: Program[0]
2026-04-19 15:42:01.356 [info] Server started with process ID 41220
2026-04-19 15:42:02.930 [info] [Program] Language server initialized
2026-04-19 15:42:02.931 [info] [Program] Monitoring client process 33904 for exit
2026-04-19 15:42:03.719 [error] [textDocument/documentSymbol] [LSP] System.ArgumentNullException: Value cannot be null. (Parameter 'Document is null when it was required for textDocument/documentSymbol')
at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestContext.GetRequiredDocument() in /_/src/LanguageServer/Protocol/Handler/RequestContext.cs:line 211
at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentSymbolsHandler.HandleRequestAsync(RoslynDocumentSymbolParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Symbols/DocumentSymbolsHandler.cs:line 35
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 192
2026-04-19 15:42:03.719 [error] [textDocument/documentSymbol] [LSP] System.ArgumentNullException: Value cannot be null. (Parameter 'Document is null when it was required for textDocument/documentSymbol')
at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestContext.GetRequiredDocument() in /_/src/LanguageServer/Protocol/Handler/RequestContext.cs:line 211
at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentSymbolsHandler.HandleRequestAsync(RoslynDocumentSymbolParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Symbols/DocumentSymbolsHandler.cs:line 35
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 192
2026-04-19 15:42:03.727 [error] Request textDocument/documentSymbol failed.
Message: Value cannot be null. (Parameter 'Document is null when it was required for textDocument/documentSymbol')
Code: -32000
[object Object]
2026-04-19 15:42:03.729 [error] Request textDocument/documentSymbol failed.
Message: Value cannot be null. (Parameter 'Document is null when it was required for textDocument/documentSymbol')
Code: -32000
[object Object]
2026-04-19 15:42:06.516 [info] [textDocument/semanticTokens/range] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from c:\Users\eriks\.vscode\extensions\ms-dotnettools.csharp-2.130.5-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.exe reloading to start from C:\Program Files\dotnet\dotnet.exe to match necessary SDK location.
2026-04-19 15:42:06.550 [warning] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Project C:\Users\eriks\AppData\Local\Temp\roslyn-canonical-misc\1883e35b-b3b9-41c5-a114-4fbaa1275f59\Canonical.csproj has unresolved dependencies
2026-04-19 15:42:06.971 [info] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Successfully completed load of C:\Users\eriks\AppData\Local\Temp\roslyn-canonical-misc\1883e35b-b3b9-41c5-a114-4fbaa1275f59\Canonical.cs
2026-04-19 15:42:07.075 [info] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Restoring Canonical.cs: Running dotnet restore on C:\Users\eriks\AppData\Local\Temp\roslyn-canonical-misc\1883e35b-b3b9-41c5-a114-4fbaa1275f59\Canonical.cs
2026-04-19 15:42:07.080 [info] [textDocument/semanticTokens/range] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2026-04-19 15:42:08.143 [info] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Restoring Canonical.cs: Determining projects to restore...
2026-04-19 15:42:08.612 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\src\PortfolioAnalyzer.Analysis\PortfolioAnalyzer.Analysis.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.636 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\src\PortfolioAnalyzer.QuoteService\PortfolioAnalyzer.QuoteService.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.640 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\tests\PortfolioAnalyzer.Analysis.Tests\PortfolioAnalyzer.Analysis.Tests.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.644 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\src\PortfolioAnalyzer.Web\PortfolioAnalyzer.Web.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.646 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\tests\PortfolioAnalyzer.Domain.Tests\PortfolioAnalyzer.Domain.Tests.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.650 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\tests\PortfolioAnalyzer.QuoteService.Tests\PortfolioAnalyzer.QuoteService.Tests.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.652 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\src\PortfolioAnalyzer.Infrastructure\PortfolioAnalyzer.Infrastructure.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.655 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\src\PortfolioAnalyzer.Domain\PortfolioAnalyzer.Domain.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.656 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\tests\PortfolioAnalyzer.Infrastructure.Tests\PortfolioAnalyzer.Infrastructure.Tests.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.659 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\tests\PortfolioAnalyzer.Application.Tests\PortfolioAnalyzer.Application.Tests.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.662 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\src\PortfolioAnalyzer.Application\PortfolioAnalyzer.Application.csproj loaded by C# Dev Kit
2026-04-19 15:42:08.665 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project D:\source\TradeTrack2\tests\PortfolioAnalyzer.Integration.Tests\PortfolioAnalyzer.Integration.Tests.csproj loaded by C# Dev Kit
2026-04-19 15:42:09.105 [info] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Restoring Canonical.cs: Restored C:\Users\eriks\AppData\Local\Temp\roslyn-canonical-misc\1883e35b-b3b9-41c5-a114-4fbaa1275f59\Canonical.csproj (in 610 ms).
2026-04-19 15:42:09.183 [info] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Restore complete
2026-04-19 15:42:09.184 [info] [textDocument/semanticTokens/range] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:04.5303058
2026-04-19 16:02:36.569 [error] [textDocument/definition] [LSP] System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'position')
at Microsoft.CodeAnalysis.Text.CompositeText.CompositeTextLineInfo.IndexOf(Int32 position) in /_/src/Compilers/Core/Portable/Text/CompositeText.cs:line 475
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetLineFromPosition(Int32 position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 40
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetLinePosition(Int32 position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 48
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.TextSpanToRange(TextSpan textSpan, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 381
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.<TextSpanToLocationAsync>g__ConvertTextSpanWithTextToLocation|34_1(TextSpan span, SourceText text, DocumentUri documentUri) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 605
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.<TextSpanToLocationAsync>g__ConvertTextSpanToLocationAsync|34_0(TextDocument document, TextSpan span, Boolean isStale, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 600
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.TextSpanToLocationAsync(TextDocument document, TextSpan textSpan, Boolean isStale, Nullable`1 context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 579
at Microsoft.CodeAnalysis.LanguageServer.Handler.AbstractGoToDefinitionHandler.GetDefinitionsAsync(IGlobalOptionService globalOptions, IMetadataAsSourceFileService metadataAsSourceFileService, Workspace workspace, Document document, Boolean forSymbolType, LinePosition linePosition, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Definitions/AbstractGoToDefinitionHandler.cs:line 67
at Microsoft.CodeAnalysis.LanguageServer.Handler.AbstractGoToDefinitionHandler.GetDefinitionAsync(TextDocumentPositionParams request, Boolean forSymbolType, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Definitions/AbstractGoToDefinitionHandler.cs:line 47
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken)
2026-04-19 16:02:36.570 [error] Request textDocument/definition failed.
Message: Specified argument was out of the range of valid values. (Parameter 'position')
Code: -32000
[object Object]
2026-04-19 16:02:36.713 [error] [textDocument/definition] [LSP] System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'position')
at Microsoft.CodeAnalysis.Text.CompositeText.CompositeTextLineInfo.IndexOf(Int32 position) in /_/src/Compilers/Core/Portable/Text/CompositeText.cs:line 475
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetLineFromPosition(Int32 position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 40
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetLinePosition(Int32 position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 48
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.TextSpanToRange(TextSpan textSpan, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 381
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.<TextSpanToLocationAsync>g__ConvertTextSpanWithTextToLocation|34_1(TextSpan span, SourceText text, DocumentUri documentUri) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 605
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.<TextSpanToLocationAsync>g__ConvertTextSpanToLocationAsync|34_0(TextDocument document, TextSpan span, Boolean isStale, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 600
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.TextSpanToLocationAsync(TextDocument document, TextSpan textSpan, Boolean isStale, Nullable`1 context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 579
at Microsoft.CodeAnalysis.LanguageServer.Handler.AbstractGoToDefinitionHandler.GetDefinitionsAsync(IGlobalOptionService globalOptions, IMetadataAsSourceFileService metadataAsSourceFileService, Workspace workspace, Document document, Boolean forSymbolType, LinePosition linePosition, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Definitions/AbstractGoToDefinitionHandler.cs:line 67
at Microsoft.CodeAnalysis.LanguageServer.Handler.AbstractGoToDefinitionHandler.GetDefinitionAsync(TextDocumentPositionParams request, Boolean forSymbolType, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/Definitions/AbstractGoToDefinitionHandler.cs:line 47
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken)
2026-04-19 16:02:36.714 [error] Request textDocument/definition failed.
Message: Specified argument was out of the range of valid values. (Parameter 'position')
Code: -32000
[object Object]
Type: Bug
Issue Description
Error pops up "Request textDocument/definition failed." from C# extension
Steps to Reproduce
It just happens in the background. I assume an issue with some recent code change - like a csproj file? It just happens from time to time.
Expected Behavior
Don't raise the error because you handle whatever condtion this is
Actual Behavior
Error toast as described above.
Extension version: 2.130.5
VS Code version: Code 1.116.0 (560a9dba96f961efea7b1612916f89e5d5d4d679, 2026-04-15T00:28:13Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Logs
C# log
Details
C# LSP Trace Logs log
Details
Environment Information
VSCode version: 1.116.0
C# Extension: 2.130.5
Using OmniSharp: false
Dotnet Information
Host:
Version: 10.0.5
Architecture: x64
Commit: a612c2a105
RID: win-x64
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.5 [c:\Users\eriks\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime.dotnet\10.0.5
x64aspnetcore\shared\Microsoft.AspNetCore.App]Microsoft.NETCore.App 10.0.5 [c:\Users\eriks\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime.dotnet\10.0.5
x64aspnetcore\shared\Microsoft.NETCore.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]
DOTNET_NOLOGO [true]
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
GPU0: VENDOR= 0x8086, DEVICE=0x46a6 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.6790 ACTIVE
GPU1: VENDOR= 0x10de, DEVICE=0x2860 [NVIDIA GeForce RTX 4070 Laptop GPU], DRIVER_VERSION=32.0.15.9597
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8246
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
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments