Asp.Net core Kestrel部署,不显示console窗口
vscode,可修改项目文件.csproj
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<OutputType>WinExe</OutputType>
就这句
在visual studio比较简单,web项目右键属性打开项目属性,输出类型
选择Windows 应用程序

然后生成后的exe执行后,不会显示控制台