Launch address already in use after initial launch of Blazor app
See original GitHub issueIssue Description
Presented with error: “Address https://127.0.01:5001 address already in use” after initial launch of application. If I end the .Net Core Host process I experience the same issue presented here: #4056
This error doesn’t present itself if application is launched in Visual Studio as opposed to VSCode.
Steps to Reproduce
- Launch Blazor WebAssembly app
- Stop application
- Launch application again
Expected Behavior
Application launches without error to home page
Actual Behavior
Error message received: “The terminal process “cmd.exe ‘/c’, ‘chcp 65001 >NUL & dotnet run’” terminated with exit code: 3762504530”
Exception Log
OmniSharp log
OmniSharp server started. Path: c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.4.omnisharp\1.37.3\OmniSharp.exe PID: 7304
Starting OmniSharp on Windows 6.2.9200.0 (x64)
DotNetPath set to dotnet
Located 2 MSBuild instance(s)
1: Visual Studio Professional 2017 15.9.28307.1000 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin"
2: StandAlone 16.8.0 - "c:\Users\username\.vscode\extensions\ms-dotnettools.csharp-1.23.4\.omnisharp\1.37.3\.msbuild\Current\Bin"
It looks like you have Visual Studio lower than VS 2019 16.3 installed.
Try updating Visual Studio to the most recent release to enable better MSBuild support. info: OmniSharp.MSBuild.Discovery.MSBuildLocator MSBUILD_EXE_PATH environment variable set to ‘c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.4.omnisharp\1.37.3.msbuild\Current\Bin\MSBuild.exe’ info: OmniSharp.MSBuild.Discovery.MSBuildLocator Registered MSBuild instance: StandAlone 16.8.0 - “c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.4.omnisharp\1.37.3.msbuild\Current\Bin” CscToolExe = csc.exe CscToolPath = c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.4.omnisharp\1.37.3.msbuild\Current\Bin\Roslyn MSBuildExtensionsPath = c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.4.omnisharp\1.37.3.msbuild MSBuildToolsPath = c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.4.omnisharp\1.37.3.msbuild\Current\Bin info: OmniSharp.Cake.CakeProjectSystem Detecting Cake files in ‘c:\dev\BlazorTestProj’. info: OmniSharp.Cake.CakeProjectSystem Could not find any Cake files info: OmniSharp.MSBuild.ProjectSystem No solution files found in ‘c:\dev\BlazorTestProj’ info: OmniSharp.MSBuild.ProjectManager Queue project update for ‘c:\dev\BlazorTestProj\BlazorTestProj.csproj’ info: OmniSharp.Script.ScriptProjectSystem Detecting CSX files in ‘c:\dev\BlazorTestProj’. info: OmniSharp.Script.ScriptProjectSystem Could not find any CSX files info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0 info: OmniSharp.MSBuild.ProjectManager Loading project: c:\dev\BlazorTestProj\BlazorTestProj.csproj info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0 info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100 info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110 info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140 info: OmniSharp.WorkspaceInitializer Configuration finished. info: OmniSharp.Stdio.Host Omnisharp server running using Stdio at location ‘c:\dev\BlazorTestProj’ on host 15576. info: OmniSharp.MSBuild.ProjectManager Successfully loaded project file ‘c:\dev\BlazorTestProj\BlazorTestProj.csproj’. info: OmniSharp.MSBuild.ProjectManager Adding project ‘c:\dev\BlazorTestProj\BlazorTestProj.csproj’ info: OmniSharp.MSBuild.ProjectManager Update project: BlazorTestProj info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\App.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\Pages\Index.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\Pages\FetchData.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\Pages\Counter.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\Shared\NavMenu.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\Shared\SurveyPrompt.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor_Imports.razor.g.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: c:\dev\BlazorTestProj\obj\Debug\netstandard2.1\Razor\Shared\MainLayout.razor.g.cs added to workspace
C# log
Environment information
VSCode version: 1.50.1 C# Extension: 1.23.4
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.201 Commit: b1768b4ae7Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.201\
Host (useful for support): Version: 3.1.9 Commit: 774fc3d6a9
.NET Core SDKs installed: 2.1.508 [C:\Program Files\dotnet\sdk] 2.1.509 [C:\Program Files\dotnet\sdk] 2.1.511 [C:\Program Files\dotnet\sdk] 2.1.701 [C:\Program Files\dotnet\sdk] 2.1.801 [C:\Program Files\dotnet\sdk] 2.1.802 [C:\Program Files\dotnet\sdk] 2.2.401 [C:\Program Files\dotnet\sdk] 2.2.402 [C:\Program Files\dotnet\sdk] 3.0.100 [C:\Program Files\dotnet\sdk] 3.1.102 [C:\Program Files\dotnet\sdk] 3.1.201 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
csharp | ms-dotnettools | 1.23.4 |
debugger-for-chrome | msjsdiag | 4.12.11 |
remote-wsl | ms-vscode-remote | 0.50.1 |
vscode-icons | vscode-icons-team | 11.0.0 |
vscode-pull-request-github | GitHub | 0.20.1 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (6 by maintainers)
Top GitHub Comments
Yep – this particular issue is resolved.
Thanks for reporting this issue, @javsjmoore.
It looks like there was a regression in the code that terminates the application server when the user has stopped debugging. I can take a look at this.