How to run Dotnet run in background on windows server from Teamcity build step

Question:

In a integrationtest running on Teamcity I am trying to

  • Launch a ASPNET Core app using dotnet run
  • Run Integration test
  • Stop webserver

Using powershell I am then trying to run the webserver in the background using

But this just gives me

16 someName BackgroundJob Completed True localhost dotnet run

But the webserver is not running and no error is outputtet

Is there another way to launch a kestrel server in the background using dotnet command?

Answer:

Found a solution

But swapped to using the compiled version of the webserver instead of dotnet run

Doing this to launch my webserver build step

Run tests

And this to end it

Works

Source:

How to run Dotnet run in background on windows server from Teamcity build step by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply