Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 :)

like image 392
Ariella Avatar asked Sep 13 '25 17:09

Ariella


2 Answers

More googling, and the fix for me turned out to be VS-Installer borking the install;

"Development tools for .NET" - was never installed.. Because I deselected F# language support.

My solution found via https://developercommunity.visualstudio.com/t/vs-2022-preview-2-the-project-doesnt-know-how-to-r/1491655

like image 179
MisterNad Avatar answered Sep 15 '25 08:09

MisterNad


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

Let me know if it worked :)

like image 45
Sohmtee Avatar answered Sep 15 '25 06:09

Sohmtee