'Launching integration test (MSTest) after starting the API without using two instances of Visual Studio

I have a .NET WebApi and an MSTest Project that contains the integration tests to call the API via HttpClient.
Because I did not find a way how to let the MSTests run while the API is started, I start Visual Studio 2022 two times.
One instance with the launched API and then another instance where I can run the tests.
But this is not a nice solution, because pretty often both projects are trying to "build" in the same location.
This leads to error messages looking like this:

enter image description here

There must be a better way, but defining multiple startup projects also does not work.
The best would be to start my Integration Tests a short while automatically after launching the main API Project.

How would you do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source