2021年3月30日星期二

How to get PowerShell to execute all lines in the script? (and not take a rest on dotnet?)

I have a PowerShell version 5.1.19041.610 script that does roughly the following

Do Command 1    Do Command 2    dotnet run "..\MyApiProject\API.csproj" --no-build    Do Command 4  

It works fine until dotnet run hijacks the session and outputs:

Now listening on: http://localhost:5000  Now listening on: https://localhost:5001  Application started. Press Ctrl+C to shut down.  

The script just stops there. I need it to Do Command 4. How can I get PowerShell to start dotnet and just carry on to the next command?

https://stackoverflow.com/questions/66880859/how-to-get-powershell-to-execute-all-lines-in-the-script-and-not-take-a-rest-o March 31, 2021 at 10:31AM

没有评论:

发表评论