ASP.NET Core- wrong processPath in generated web.config
A few options for getting the .exe in there. Each of these methods worked for me:
Switch the build configuration from
Debug
(the default) toRelease
:dotnet publish -c Release
or msbuild argument/p:Configuration=Release
Create a web.config the way you want it in the root of your project and then tell the SDK not to touch it by adding the following to your project file:
<PropertyGroup> <IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled> </PropertyGroup>
Specify your target runtime as one of the win-* runtimes listed at https://docs.microsoft.com/en-us/dotnet/core/rid-catalog. Here's the code that appears to be adding the exe extension:
https://github.com/aspnet/websdk/blob/6b898ad0a39329ab5f0db281a9c1712e4303ed61/src/Publish/Microsoft.NET.Sdk.Publish.Targets/netstandard1.0/TransformTargets/Microsoft.NET.Sdk.Publish.TransformFiles.targets#L44
I had exactly the same problem, and I solved it last week. We had 2 ASP.Net Core projects, one showing the issue, the other didn't have the issue. So we compared the 2 .csproj files.
Turns out that in our case, all we needed to do was delete the
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
properties from the .csproj; once that was done, MSBuild correctly created the web.config, including the .exe at the end of the processPath.
I had exactly the same problem, and I solved it last week. We had 2 ASP.Net Core projects, one showing the issue, the other didn't have the issue.
Firstly check C:\Program Files\dotnet
path, if the 'sdk' folder is not available then you need to install the ASP.NET Core SDK. If you install this package then the problem is resolved and the app is running with:
<aspNetCore processPath="dotnet" arguments=".\yourapp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"/>