Skip to content

Error: Stream terminated before required bytes were read. #2668

@NemoStein

Description

@NemoStein

Describe the Issue

This is a reopening of #1910

Both vscode and dotnet-sdk installed with scoop

Opening workspace-based temporary solution
Starting Opening a solution...
Starting collecting .csproj files in the workspace in Dev Kit Server...
Starting Spawn .NET server...
Using dotnet resolution provided by ".NET Install Tool".
Using existing .NET runtime at "C:\Users\nemo.stein\scoop\apps\dotnet-sdk\current\dotnet.exe" to load Dev Kit processes.
.NET Sdk found: "C:\Users\nemo.stein\scoop\apps\dotnet-sdk\current\dotnet.exe".
Workspace folder: c:\Users\nemo.stein\NemoStein\Workspace\dmi-grm-api, requires SDK version: 10.0.101
Asp.Net runtime found, using Asp.Net runtimeconfig for project system host.
.NET server STDERR: Unhandled exception. System.IO.FileNotFoundException: The system cannot find the file specified. (0x80070002)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
   at Microsoft.ServiceHub.Utility.Shared.Common.StartProcessWindows(ProcessStartInfo startInfo, EventHandler onExited, EventHandler onDisposed)
   at Microsoft.ServiceHub.Client.IsolatedHubControllerClient.CreateControllerAsync(ServiceHubConfig config, TraceSource logger, CancellationTokenSource cts)
   at Microsoft.ServiceHub.Client.HubControllerClient.StartAsync(ServiceHubConfig config, String clientName, CancellationToken cancellationToken)
   at Microsoft.ServiceHub.Client.HubClient.LaunchOrFindControllerAsync()
   at Microsoft.VisualStudio.Threading.AsyncLazy`1.<>c__DisplayClass20_0.<<GetValueAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.ServiceHub.Client.HubClient.GetLocationServiceAsync()
   at Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](Func`1 actionToExecute, TraceSource logger, ServiceHubRetryConfiguration`1 serviceHubRetryConfiguration, CancellationToken cancellationToken)
   at Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](Func`1 actionToExecute, TraceSource logger, ServiceHubRetryConfiguration`1 serviceHubRetryConfiguration, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Threading.AsyncLazy`1.<>c__DisplayClass20_0.<<GetValueAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.ServiceHub.Client.HubClient.GetThisAsRemoteServiceBrokerAsync()
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.RunAsync(Stream rpcStream, String bridgePipeName, ExportProvider exportProvider, Boolean includeServiceHub, String serviceHubConfigPath, Func`2 traceSourceFactory, TraceSource traceSource, TelemetrySession telemetrySession, TelemetryEvent perfTelemetryEvent, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.RunAsync(Stream rpcStream, String bridgePipeName, ExportProvider exportProvider, Boolean includeServiceHub, String serviceHubConfigPath, Func`2 traceSourceFactory, TraceSource traceSource, TelemetrySession telemetrySession, TelemetryEvent perfTelemetryEvent, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.<>c__DisplayClass10_0.<<BuildCommandLine>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__17_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__4_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass1_0.<<CancelOnProcessTermination>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.InvocationPipeline.<InvokeAsync>g__FullInvocationChainAsync|2_0(InvocationContext context)
   at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console, CancellationToken cancellationToken)
   at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.Main(String[] args)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.<Main>(String[] args)

Error occurred in launchDotNetServer: Error: Stream terminated before required bytes were read.
Failed at 'Spawn .NET server' (11534ms) with error: Error: Stream terminated before required bytes were read.
Failed at 'collecting .csproj files in the workspace in Dev Kit Server' (11544ms) with error: Error: Stream terminated before required bytes were read.
.NET server exited with 3762504530
Failed at 'Opening a solution' (11549ms) with error: SolutionOpenError: Run into errors while opening the solution: Error: Stream terminated before required bytes were read.
Failed to open solution SolutionOpenError: Run into errors while opening the solution: Error: Stream terminated before required bytes were read.

Steps To Reproduce

  1. Install vscode and dotnet-sdk using scoop
  2. Open a solution
  3. See error (toast and output window)

Expected Behavior

No error - solution opened correctly

Environment Information

Version: 1.107.1
Commit: 994fd12f8d3a5aa16f17d42c041e5809167e845a
Date: 2025-12-17T14:15:14.850Z
Electron: 39.2.3
ElectronBuildId: 12895514
Chromium: 142.0.7444.175
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200`

C# Dev Kit: 1.91.6 (pre-release)
C#: 2.111.2 (pre-release)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions