19

Old .NET Projects have an option under debug that allows "Start External Command" as shown in this figure

enter image description here

When I create a new project using the new SDK style, I can't see the same option (as the figure below). Is there a way to get it back?

  • Both pictures were taken from the same VS (so it is not version specific)
  • A workaround that I found is running the program normally and attach to it but it is not convenient.

enter image description here

3
  • After my testing, in both versions 19 and 22. I saw the same settings as the first picture on the Winform of the framework, and the second picture in the core. Do you want to change the version to the framework? What kind of environment are you referring to in the old net? Commented Jan 12, 2022 at 2:53
  • Good question, they broke quite a few things with the refactoring of these settings. Commented Jan 12, 2022 at 9:55
  • @JialeXue-MSFT, Both pictures are for .NET Framework 4.8 class library. For VS 2022, I created an .NET Core 3.1 project, then changed csproj to .net48 Commented Jan 12, 2022 at 15:11

2 Answers 2

29

In the Launch Profiles window, you have a "new profile" icon in the top left hand corner. If you click that, a menu opens and lets you choose either a Project or an Executable File. If you choose the later, you get the option back for which you were looking.

The "new start profile" menu

To use the new setting, select the relevant project as startup project (either in the solution explorer or by using the small arow to the right of the project list in the toolbar). Then use the profile drop-down to select the relevant profile.

Using the profiles

The dropdown with the red arrow lets you select the startup project, the dropdown with the blue arrow the startup profile (for that project).

Sign up to request clarification or add additional context in comments.

3 Comments

For the sake of completeness, this window is now called Launch Profiles and can still be reached from the Project Properties --> Debug.
Ok.... but how to use the profile?
@DanielMöller I extended my answer. I hope that helps.
1

I have no Idea why but, in creating my own template, I experienced the same missing "Start Action".

I couldn't understand, since I was using the same SDK and versions, why one Project Solution showed the "Start Action" and the other didn't. Once I saved the solution and closed the multiple sessions I had open, and then reopened the solution, the "Start Action" appeared.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.