'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.
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 :)
Solution 1:[1]
I fixed it! Here's what I did
- Open Visual Studio Installer and click on "Modify" under VS2022
- Install the following: .NET desktop development under Desktop & Mobile, and Office/SharePoint development under Other Toolsets
Tell me if it worked :)
Solution 2:[2]
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
Solution 3:[3]
I met the same issue today and finally solved it. My steps:
- open the Visual Studio Installer, under the "Installed" label, you can see the installed vs2022.
- click "More" and then choose the first "Repair" option.
- wait about 30 minutes' repair and restart the system by the tips.
Solution 4:[4]
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!
Solution 5:[5]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sohmtee |
Solution 2 | MisterNad |
Solution 3 | ophunter |
Solution 4 | MCrossley |
Solution 5 | Tom A |