8

When I debug some asp.net with net 4.7 code, I can specify some arguments in the debugger and the main function is getting them.

I realized that this is not happening with .net core; I can put whatever I want in the "Application arguments" in the debugger tab, the application never sees that data.

Is that yet another case of VS' interface not matching .net core? or did I miss something obvious?


Adding more details:

enter image description here

enter image description here

4 Answers 4

5

Please confirm Project Setting file changes are saved.

In case of .NET Core project, it does not save automatically, even if solution compiled.

enter image description here

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

6 Comments

That's what I have; I edited the main post with screenshots
@Thomas Looks good to me. Did project property save? Is Run configuration set as IIS Express?
I just found the problem! When I run the code in the debugger, normally the project settings, and any modified source file, is automatically saved prior to compilation. In this case it is not, I have no idea why but the project settings require a manual save!
@Thomas good for you! wondering why not Project property changes saved automatically on .net core project...
It saved the file, restarted VS, and still the problem!
|
3

"Project" should be choosen in the "Launch" option.

Comments

1

In my case you need to edit launchSettings.json manually.

enter image description here

And replace blue color with the project name, save - build, and try to run the project again. enter image description here

Hope it helps.

Comments

0

I had the same problem and the solution mentioned above did not work for me.

I am able to solve the problem in the following steps.

  1. In the project setting, choose the 'project name' in the Profile field instead of "IIS Express".
  2. You can find IIS Express icon on the tool bar to launch the application. Switch the label from IIS Express to your project name.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.