Please select a valid startup item - visual-studio-2017

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.

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

File > New > Project From existing code. Select type of project > Next. Enter project name > Finish.

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,

Open Visual Studio ------------------
Click File
Click Open
Open as Web Sites
Another method
Click File
Click Open
Open as Project

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!

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

Related

Visual Studio 2017 source control missing in file menu

As a starting developer I am running into some problemes with Visual Studio 2017. I developed some weeks without any problems, but now I can't add a project under source control.
If I add a blank solution I used to be able to add a new project to that solution, but that option isn't visible anymore. It happend when I added a project under source control. How can I undo this?
missing menu (picture from a manual made earlier)
Solution: File --> Open --> Open from source control --> select the right project.
Now new projects can be added to the solution. Save this solution and you can open it when VS starts.
Not sure, but see if this works. This was in visual studio 2013, but is the same problem.
Click here!

Visual Studio 2017, Intellisense is not working

I just upgraded from VS2015 to 2017, and intellisense highlighting of syntax errors has disappeared completely.
I tried some suggestions found online, mainly Edit->Intellisense->Refresh Local Cache, but that option is not there anymore.
Under Edit->Intellisense there is only Quick info which does nothing when I press it, and toggle completion mode which is greyed out
I'm using Windows 10, C++ project.
Do I need to delete some old files from VS2015 in order for intellisense to work again? like the VC.db file?
Thanks
When IntelliSense stopped working in some files, I just deleted the project cache, restarted Visual Studio and opened the project again. Bear in mind that some minor settings also get reset (like the selected architecture).
Step by step
View => Solution Explorer (in case it isn't already open)
Right click "Solution 'Project name'"
Click "Open Folder in File Explorer"
Close Visual Studio
Show hidden folders (Win10 How-to)
Delete folder ".vs"
Open Visual Studio and project (wait a few seconds)
Hope this helps. -Minding
If you encounter a file in which the intellisense or error list is not functioning properly, look at the top-left corner of the navigation bar and check to see if that file is marked as “Miscellaneous Files”
If it is, the steps to solve the issue is:
Go to the file inside Solution Explorer.
Right-Click file and select Exclude From Project.
Right-Click your project/folder where the file was and click Add Existing Item, and add the file you just removed back into your project.
This should fix whatever issues you're having. (Tip: You can multi-select source/header files, so this does not need to be done one at a time).
Right-click on solution and select Rescan Solution (Visual Studio 2017). This should re-sync IntelliSense with solution data.
Please try to click Tools->Text Editor->C/C+±>Advanced, under IntelliSense, set
Member List Commit Aggressive to True and recheck this issue. Also, set
Use Aggressive Member list for Auto Member list to *False.
In my case, the project was referring to 2 different versions of the same library. I uninstalled one of the versions and intellisense started working.

Unable to add app.config file in Visual Studio 2017?

Working in Visual Studio 2017; I have added a class library in my project. Now I want to add an app.config file.
When I try to add by "Add new Item" but config file is missing from item list.
How can I do it?
You probably forgot to install workload .NET desktop development.
Go to installation, click to modify and include the workload .NET desktop development.
Check image of installation screen
Just right click your class library. Click on Add -> New Item and you should find Application Configuration file
Note:
If you have a solution without any project or all project are unloaded, you would not find the Application Configuration File
If you are missing visual studio templates,then Close all instance of Visual Studio and Open visual studio command prompt and type,
devenv /installvstemplates
Press Enter. Let the process be complete and now open visual studio. You will get all missing templates under Visual Studio installed templates.
I couldn't add app.config using the GUI tools for my web project. However, I have added the app.config file manually and the build process picked it up and used it.

Visual Studio 2012 doesn't load any project

So, I'm kinda new into this VS world. I'm using VS 2012 and it was everything working correctly last time. Now I try to open my projects and none of them actually loads. When I go to the solution explorer I just see the message "Load failed" followed by the message: "The project requires user input. Reload for more information." But when I reload, it pops up a message "The operation could not be completed. There is no support for this interface."
I don't know what it means by "requires user input", i never opened my project with any input, I just click on the project's file and open it...
Anyway, what is going on??
Thanks.
I got the same message (using VS 2013) opening a project located on a network drive.
I Right clicked the project in Solution Explorer and selected 'Reload Project', a dialog appeared warning me about an untrusted location, I clicked OK and the project loaded successfully.
Change the folder name of your project. Then VS asks again if it is trustable. than click YES. after that VS reloads the project
I had to "repair" Visual Studio Express 2012 on my Windows 10.0 Laptop. You get the repair option if you already have Visual Studio installed.
This fixed my issue which was exactly like above.
I removed the ComponentModelCache folder and restarted Visual Studio 2012.
This solved the issue for me.
C:\Users\username\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache
This worked for me as well. I removed the contents of the folder, ComponentModelCache, then I restarted 2012 and the projects loaded without issue.

visual studio 2010 unable to start program .dll

I have a problem for my visual studio 2010. When I click start debugging button and it's start debugging.
It seems that there is no error "i just create one "button" on it "
But it will show Unable to start program 'c:\users\.....\xx.dll'
Does someone now how to solve it?
The second question is: when I click left button to see the "Button" source code,
why it will show all this project code? Should I revise some setting?
Visual studio will not run a .dll by itself. does your solution have an .exe project? if so, right click it and select "Set as Startup Project". if not you will need to create one, and instruct it to load the forms within your dll.
as for left clicking the button, I'm not quite sure what you are describing. can you post a picture?
In earlier versions of MSVC while running .dll, will get a dialog asking path for .exe file
But in MSVC 2010 and above there is no such option. To fix this
Right click on your dll project
Properties
Configuration Properties > Debugging. Here, in Command -> add path to your exe.
Add command arguments, if any.
You are good to go!