Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start debugging. The startup project could not be launched. VS2015

I have started a new console project in VS2015. I only have this code :

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using SautinSoft;  namespace PdfParser {     class Program     {         static void Main(string[] args)         {              string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);             SautinSoft.PdfFocus f = new PdfFocus();             f.OpenPdf(@"path:\abc.pdf");              if (f.PageCount > 0)                 f.ToExcel(@"path:\abc.xls");         }     } } 

When I try to run, I get this :

Unable to start debugging. The startup project could not be launched. Verify debug settings for the startup project.

How can I fix this? Thanks.

like image 910
jason Avatar asked Jun 03 '16 11:06

jason


People also ask

How do I set the startup project in Visual Studio 2022?

Right click the solution->click “Set Startup Projects”->Startup Projects->check “Multiple startup projects”, and select “Start” in the “Action” drop-down box of each project->click OK. Click “Start” to debug project on toolbar, then close VS.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.

How do you fix Visual Studio Cannot start debugging because the debug target is missing?

Go to Build > Configuration Manager, and make sure the project has selected the Build. Then rebuild the project and see. If the answer is the right solution, please click "Accept Answer" and kindly upvote it.


2 Answers

After upgrading MSVC2015 to Update3, I had the same problem: instead of std::map in the Watch window display as a horrible std::_Tree<std::_Tmap_traits... etc., some plugins started to throw exceptions, some projects was not able to run in debug mode.

All was solved by deleting CurrentSettings.vssettings. It is usually located at Documents\Visual Studio 2015\Settings If not, go to `Tools -> Options -> Environment -> Import and Export Settings ' to find the location of this file.

like image 144
mr NAE Avatar answered Sep 17 '22 17:09

mr NAE


Had this on a brand new scaffolded ASP.NET Core 1.0 web application.

Solved with restart of Visual Studio.

like image 42
fiat Avatar answered Sep 20 '22 17:09

fiat