Asp.net 核心应用程序部署为 exe

Asp.net core application deploy as exe

我使用 asp.net 核心 .net 框架 4.6.1 而不是 core2 创建新应用程序。 当我构建应用程序或将其部署为 .exe 而不是 dll 时。

下面是 web.config 发布文件夹:

<aspNetCore processPath=".\Projectxxx.Upload.exe" 
    stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"/></system.webServer>

这是否意味着该项目已结束?

此外,如果我遇到任何错误,请给我这条消息

HTTP 错误 502.5 - ANCM 进程外启动失败

我想让这个项目在 windows 平台上 运行 只能做些什么?

任何帮助 这是我的项目文件

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
    <DebugType>full</DebugType>
    <UserSecretsId>aspnet-Projectxxx.Upload-332B348E-4A41-4FF3-A789-DD081E38AE8A</UserSecretsId>
    <TypeScriptToolsVersion>3.1</TypeScriptToolsVersion>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.CookiePolicy" Version="2.2.8" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.2.1" />
    <PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.6" PrivateAssets="All" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
    <PackageReference Include="Microsoft.Web.Administration" Version="11.1.0" />
  </ItemGroup>
</Project>

"The in-process hosting model isn't supported for ASP.NET Core apps that target the .NET Framework."

Reference