w0051977
w0051977

Reputation: 15817

Is it possible to change the Debug Profile after creating an MVC Core application?

I have a web application running using Docker and Visual Studio 2017. I am trying to test it independantly of Docker. I thought all as I would have to do is as follows:

1) Right click on the project and select properties. 2) Select Debug 3) Change Profile (from Docker) and Launch (from Docker) to IIS Express.

However, when I do this Launch changes, however Profile does not i.e. the Pfofile change appears to rollback when I close the Debug window. Why is this?

This also happens if I create a new MVC Core 2 project and try to change the Profile.

I also notice that if I create a new MVC Core 2 project without Docker support and then add orchestration support at a later date, then the Docker profile does not appear in the Profile drop down.

I have spent the last two hours Googling this and have not found an answer. I did find this: https://developercommunity.visualstudio.com/content/problem/39629/changing-the-debug-profile-in-aspnet-core-full-fmk.html

Is it possible to change the Debug Profile after you create an MVC Core 2 project?

Upvotes: 1

Views: 2715

Answers (1)

Kimserey Lam
Kimserey Lam

Reputation: 121

If you want to run independently of Docker from Visual Studio 2017, you can directly select a different launch profile by clicking on the small caret beside the run Docker button.

The steps you describe actually sets the launch profiles in the file under /Properties/launchSettings.json.

By default an ASP NET Core application with Docker support enabled comes with three profiles:

  1. Docker profile
  2. Self host
  3. IIS

I also notice that if I create a new MVC Core 2 project without Docker support and then add orchestration support at a later date, then the Docker profile does not appear in the Profile drop down.

Yes, adding a project without Docker support will result in the Docker profile not being created regardless of orchestration being added.

Upvotes: 3

Related Questions