0

I have azure devops publishing a dotnet core web app to an AWS server, but the app serilog logs are not kicking in because even though the DLLS etc are updated the myapp.dll is not re-started, so the logging setup code in program.cs is not executed.

If I run the app in powershell using "dotnet myapp.dll" then the logging file appears but that starts a seperate process on a different port... so it doesnt help.

The app runs under IIS on the server and Im not sure if this is a devops issue or something i need to do in IIS..

I added this as the last step to the pipeline but I get an error You misspelled a built-in dotnet command.

  • You intended to execute a .NET Core program, but dotnet-.\myWork.dll does not exist.
  • You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

enter image description here

LukePerrin
  • 235
  • 5
  • 17

1 Answers1

0

The pipeline doesn't start your application. Even if it worked, you would have an app running on the Agent that's executing the pipeline, not on your server.

If you want the app hosted on your server, I'd start with Publish an ASP.NET Core app to IIS tutorial.

  1. Get it deployed on your server manually and ensure it's running correctly. But don't do right-click publish - use commandline all the way.
  2. Once you know what are the necessary steps (and what might go wrong), you can start automating it.
qbik
  • 5,502
  • 2
  • 27
  • 33