Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在VS代码中调试.net Core 3.0 API时出现未知错误:0x800700c1_C#_Visual Studio Code_Vscode Debugger_.net Core 3.0 - Fatal编程技术网

C# 在VS代码中调试.net Core 3.0 API时出现未知错误:0x800700c1

C# 在VS代码中调试.net Core 3.0 API时出现未知错误:0x800700c1,c#,visual-studio-code,vscode-debugger,.net-core-3.0,C#,Visual Studio Code,Vscode Debugger,.net Core 3.0,我正在用3.0构建一个.Net核心API 在一周前,一切都运行良好,在几天的时间里,当我尝试调试时,它抛出了一个奇怪的错误,如下面左下角的屏幕截图所示 此时调试器将停止 以下是我的.vscode>launch.jason文件 { "version": "0.2.0", "configurations": [ { "name": ".NET Core Launc

我正在用3.0构建一个.Net核心API

在一周前,一切都运行良好,在几天的时间里,当我尝试调试时,它抛出了一个奇怪的错误,如下面左下角的屏幕截图所示

此时调试器将停止

以下是我的.vscode>launch.jason文件

{
"version": "0.2.0",
   "configurations": [
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/WebApi.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
            "serverReadyAction": {
                "action": "openExternally",
                "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
            },
            "env": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views"
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ]
}
以下是我的WebApi.csproj

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="AutoMapper" Version="9.0.0" />
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.5.0" />
  </ItemGroup>
</Project>

netcoreapp3.0
运行时间;建设;本地人;内容文件;分析仪;可传递的
全部的

我尝试重新运行项目删除调试文件夹,但没有成功。

也有同样的问题。该错误意味着您向调试器发送了一个非可执行文件。 尝试并验证您尝试调试的可执行文件的路径是否在
launch.json
(程序属性)正确配置。

“程序”:“${workspaceFolder}/bin/debug/netcoreapp3.0/WebApi.dll”该引用是否仍然存在?