流程创建失败,出现错误:在调试模式下启动项目时,访问被拒绝

时间:2019-03-19 11:41:57

标签: asp.net .net visual-studio asp.net-core .net-core

我有一个针对net4.6.1的ASP.NET Core项目 每当我尝试使用dotnet run从VS2017和命令行通过调试启动项目时,都会引发以下错误。

enter image description here

csproj如下:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
    <Platforms>x64</Platforms>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
    <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
    <StartupObject></StartupObject>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\pathToAnotherProject\myproject.csproj" />
  </ItemGroup>

</Project>

我可以提到我有一个作为ASP.NET Core项目创建的启动项目,以及多个针对net461的.net核心类库项目。

知道问题出在哪里吗?

1 个答案:

答案 0 :(得分:0)

您是否尝试过在VS2017选项的debugging> general部分中启用“使用托管的兼容模式”。