Visual Studio 2022 cannot start debugging

Vivek Kahar (Student) 0 Reputation points
2024-03-07T15:57:01.87+00:00

Created a new project using C# Console app and .NET 8 Framework and I cannot run my code as it is greyed out

User's image

Developer technologies Visual Studio Debugging
Developer technologies Visual Studio Testing
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2024-03-08T03:04:49.5866667+00:00

    Hello @Vivek Kahar (Student) ,

    Welcome to Microsoft Q&A forum.

    I guess this issue only appears on .NET based projects on your side. If you use a .NET Framework(different from .NET) based project, it may work.

    User's image

    But, of course, .NET based projects should also work correctly. I think .NET was not installed correctly, or not set correctly.

    Please kindly check following:

    1. Search Edit the system environment variables in Windows Search box, open it, click Environment Variables button, find System variables -> Path, select and click Edit, make sure that C:\Program Files\dotnet\ is listed higher than C:\Program Files (x86)\dotnet\.
    2. Install .NET 8.0 separately and manually from here: Download .NET 8.0.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.