Please select a valid startup item
Visual Studio-2017Visual Studio-2017 Problem Overview
I have migrated from Visual Studio 2008 to VS 2017.
I am getting this error when I try to run project with the green play button:
Obviously I have to select a valid startup item, but there are two pieces of information I need to do that:
-
what are typical valid startup items that I can try to select?
-
How do I select them?
I am a long time developer, but I am new to visual studio so please give me instructions based on terminology I can see on the screen.
Visual Studio-2017 Solutions
Solution 1 - Visual Studio-2017
It might be the case that you have opened your project using
File->Open->Folder
Use the right method to open your project using
File->Open->Project/Solution
or
File->Open->Website
Solution 2 - Visual Studio-2017
File > New > Project From existing code. Select type of project > Next. Enter project name > Finish.
Solution 3 - Visual Studio-2017
I went to File > Open > project/Solution and found the ".sln" file. I clicked on it and then pressed open and it worked for me. Just spent ages trying to figure this out!
Regards,
Solution 4 - Visual Studio-2017
Open Visual Studio ------------------
- Click File
- Click Open
- Open as Web Sites
Another method
- Click File
- Click Open
- Open as Project
Solution 5 - Visual Studio-2017
I found this question after I did File → Open → Folder as well. However in my case it's not a website, all I have is a source file. I don't want to create a full solution.
Now that Visual Studio supports CMake (to some degree), easiest is to add a simple CMakeLists.txt file, like this:
project (theproject)
add_executable (thetarget source.cpp)
As soon as the folder contains this file, Set as Startup Item turns up as a menu item in the Solution Explorer!
Solution 6 - Visual Studio-2017
The only solution is that or this error:
> please select a valid startup file is that repair your visual studio
double click on visual studio installer and then click on the More then repair your visual studio