Auto select the project on project load in Visual Studio

Peter Volz 1,295 Reputation points
2023-10-16T10:25:08.4+00:00

Hello

When I double click on a VS project solution in Windows explorer and Visual Studio is loaded, if I directly click on Build menu, all items are disabled, so cannot build/rebuild.

I need to select the one of the project files in the right side (Solution Explorer) so those items (plus more) will be enabled.

Is there any way to force it auto select the loaded solution at startup?

Thanks :)

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,711 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,610 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 27,981 Reputation points Microsoft Vendor
    2023-10-16T13:20:06.0733333+00:00

    Hello @Peter Volz ,

    Welcome to Microsoft Q&A forum.

    Did you double click on a .sln file? I tested locally, but it seems that after VS was loaded, all the projects were loaded. Clicked Build and the items were all available(I could build/rebuild). The project which was set as startup project(right-click the project > Set as Startup Project) was correctly selected automatically.

    Are you using any extension, or did you set any special configuration in VS? Would you mind sharing us a gif picture with more details to check further?

    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.