79445012

Date: 2025-02-17 09:59:52
Score: 2.5
Natty:
Report link

I was able to solve the issue by myself, but posting this here in case someone is having the same issues. I have added this in the Dockerfile for the build and publish stages. This can be used in the Jenkins pipeline as well as it throw the same error.

/p:UseAppHost=false

It turned out that this can be also places in the csproj file as well as I did yesterday:

<UseAppHost>false</UseAppHost>

However the wwwroot folder was still missing, so I have added a line in the Dockerfile for that as well:

COPY --from=publish /app/publish/wwwroot ./wwwroot

Where /app/publish is the same path set in the publish stage.

After these changes, everything is working as expected.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): having the same issue
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ivan