the project doesn't know how to run the profile ConsoleApp

Viewed 11947

I just downloaded Visual Studio 2022 (Although I much preferred 2019 but can't find it) and as soon as I open a simple "Hello World" project and try to run it, I have an error. this is pain

Using .Net 5.0 Runtime am I missing a file in my downloads?

How can I fix this? is this a 2022 issue or if I miraculously find Visual Studio 2019 somewhere online it'll show the same error?

UPDATE: 2019 works fine, it's just 2022. I'll work on 2019 but if anyone has a solution maybe it'll help other people :)

5 Answers

I met the same issue today and finally solved it. My steps:

  1. open the Visual Studio Installer, under the "Installed" label, you can see the installed vs2022.
  2. click "More" and then choose the first "Repair" option.
  3. wait about 30 minutes' repair and restart the system by the tips.

I fixed it! Here's what I did

  1. Open Visual Studio Installer and click on "Modify" under VS2022
  2. Install the following: .NET desktop development under Desktop & Mobile, and Office/SharePoint development under Other Toolsets

Tell me if it worked :)

And less than 15 minutes after commenting I have the same issue, MS release v17.0.3 of vs2022. After upgrading to that, the error message has gone and I can run my projects again!

Using the Modify action in "Uninstall or change a program" fixed it for me. Most notably my VS2022 installation had "forgotten" the Desktop workflow selection that I selected at the original installation.

Related