Search code examples
asp.net-coremodel-view-controllerpublishing

Usage of .exe file in framework-dependent asp.net core publish


What does .exe file used for in framework-dependente publish? the project works on IIS and by kestrel with and without this file. So what is the benefit of this file?


Solution

  • Despite the fact that a native executable is not required for framework-dependent deployments, it's still generated by default. You can set the UseAppHost property in .csproj to false to disable generation of the executable.

    <PropertyGroup>
      <UseAppHost>false</UseAppHost>
    </PropertyGroup>
    

    https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props?WT.mc_id=DT-MVP-5002999#useapphost