saraford
saraford

Reputation: 729

ASP.NET Web API 2 continues to start even though it is not the startup project in VS 2017

In my solution, I have two projects: an WPF application and an ASP.NET Web API 2 created using the defaults. Under the API Properties - Web tab, I'm using IIS Express.

On the Solution Property Pages, I have Single startup project checked, with the WPF project selected. I can confirm this is the startup project because the WPF application is bolded in Solution Explorer. I've verified none of the IIS Express sites are running in the task tray.

When I hit F5, both the WPF and the Web API start running.

Is there a setting I'm missing somewhere? Why is the Web API starting despite not being the startup project?

Upvotes: 1

Views: 38

Answers (1)

Scott Addie
Scott Addie

Reputation: 211

In Visual Studio 2017, navigate to View > Properties Window. Then click the Web API project name in Solution Explorer, and set the Properties window's Always Start When Debugging option to False.

Upvotes: 1

Related Questions