Please select a valid startup item

Visual Studio-2017

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

enter image description here

Obviously I have to select a valid startup item, but there are two pieces of information I need to do that:

  1. what are typical valid startup items that I can try to select?

  2. 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 ------------------

  1. Click File
  2. Click Open
  3. Open as Web Sites

Another method

  1. Click File
  2. Click Open
  3. 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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBe Kind To New UsersView Question on Stackoverflow
Solution 1 - Visual Studio-2017Milind BankarView Answer on Stackoverflow
Solution 2 - Visual Studio-2017AlainView Answer on Stackoverflow
Solution 3 - Visual Studio-2017Charles HarcuortView Answer on Stackoverflow
Solution 4 - Visual Studio-2017iamkanaramyadavView Answer on Stackoverflow
Solution 5 - Visual Studio-2017Michel de RuiterView Answer on Stackoverflow
Solution 6 - Visual Studio-2017Web DeveloperView Answer on Stackoverflow