Failed to start debugging. Failed to start launch project. VS2015

I started a new console project in VS2015. I have only 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 start, I get the following:

Unable to start debugging. Failed to start launch project. Check the debug settings for the startup project.

How can i fix this? Thank.

+84
c # visual-studio visual-studio-2015
Jun 03 '16 at 11:12
source share
25 answers

After upgrading MSVC2015 to Update3, I had the same problem: instead of std::map , the horrible std::_Tree<std::_Tmap_traits... etc. is displayed in the Watch window, etc. Some plugins started throwing exceptions, some projects failed run in debug mode.

Everything was resolved by removing CurrentSettings.vssettings . It is usually located in Documents\Visual Studio 2015\Settings If not, go to "Tools -> Options -> Environment -> Import and Export Settings" to find the location of this file.

+151
Jul 04 '16 at 11:25
source share

If it were on a completely new ASP.NET Core 1.0 web application.

Solved with restarting Visual Studio.

+131
Jul 29 '16 at 4:45
source share

I'm stuck too. I deleted the bin and obj folders, recreated, and then started.

A very meaningless mistake ....

+15
Jul 06 '16 at 13:39
source share

I had this problem when I tried start (without) Debugging my Asp.Net MVC project

Does Visual Studio run as Administrator

so just restart visual studio As Administrator

+13
Nov 01. '16 at 7:29
source share

In addition to “Cannot start debugging”, I also had errors “Operation could not be completed: Unspecified error” when I tried to rebuild.
Thanks to the Visual Studio pop-up “operation could not be completed” , it was enough to close Visual Studio 2015 and then open it again .

+9
Aug 29 '16 at 1:34
source share

Make sure you start Visual Studio as an administrator.

  • Right click on Visual Studio 2015 shortcut
  • Select the Shortcut tab
  • Click Advanced
  • Check the box "Run as administrator" (see below)

This solved the problem for me with the exact error message.

It is not always convenient to run VS in administrator mode. Make sure you uncheck the box after the problem has been fixed.

+7
Sep 11 '16 at 23:36
source share

No need to delete everything in my case, I just opened

"CurrentSettings.vssettings"

submit and commented on this property

 <PropertyValue name="DefaultBehaviorForStartupProjects">1</PropertyValue> 

and everything is fixed.

Sample

+5
Feb 14 '17 at 18:57
source share

I had the same problem and it was resolved by deleting the .vs directory in the project directory.

+3
03 Oct '16 at 22:55
source share

Just delete the hidden .vs folder. This folder is in the same place as the sln file. Removing this folder also updates the intellisense cache and fixes any problems with it. Hope this helps.

+2
Jan 04 '17 at 13:56 on
source share

Delete all matching / obj and / bin folders. Run again.

+1
Oct 11 '17 at 11:56 on
source share

Close Visual Studio and open it again.

+1
Nov 14 '17 at 4:09 on
source share

Just restart your visual studio and run as administrator.

+1
Jul 27 '18 at 8:39
source share

I had this with the Xamarin.iOS project in my Xamarin.Forms solution. I tried every sentence here, without success.

The source of the error was a misconfigured .csproj project. I never edited it myself and did not even touch on the properties of the project. I am using Visual Studio 2017 RC. I came across a solution when comparing a project file with previous versions in Source Control.

Compare the project file with the previous version and try to dramatically change the changes until you fix the problem and do not know what the reason is.

0
Feb 20 '17 at 7:28
source share

The solution for me was to delete all *.user files that are usually generated for both solution files and projects

0
Mar 21 '17 at 10:36
source share

I also found this problem. But after restarting the Visual Studio 2015 community as an administrator, I discovered a new problem:

problem

And then I try to open another solution, close another solution and open the solution with the problem, then solve the problem.

0
Jul 17 '17 at 7:17
source share

If you have a problem with an existing application, I deleted the vs settings, but the problem remains,

Finally, I just restarted VS and worked fine.

I think that sometimes when we load a project, some library does not load with a solution, so the best option before doing anything is to simply restart VS.

0
Aug 08 '17 at 9:37 on
source share

After adding a reference to the MyProjectReference project to my application and then deleting it, I also get the same error:

Unable to start debugging. Failed to start launch project. Check the debug settings for the startup project.

Deleting the configuration, starting as an administrator, rebooting VS, rebooting the machine had no effect.

After starting my web application without debugging (Right-Click Project → View In Browser (Google Chrome), I got a much more useful error:

Failed to load file or assembly "MyProjectReference" or one of the dependencies. An attempt was made to load a program with the wrong format.

My solution was then to re-add back to the solution, and then delete it again. After that, recovery and debugging worked.

0
Sep 28 '17 at 16:25
source share

As I fixed my problem, I closed the project that had this error, created a new project, built a new project, then opened the project that had the problem and assembled it. It worked for me.

0
Jan 08 '18 at 8:05
source share

Make sure you close all instances of Visual Studio and then restart with administrator privileges. In my case, I had several instances of Visual Studio open, and I had to close all of them, and then restart Visual Studio with administrator privileges to make it work.

0
Jan 30 '18 at 15:27
source share

I had Visual Studio 2015 with ASP.net MVC5 developed using DDD (Domain Driven Design). The problem was the same since I just opened Visual Studio normally.

The problem was resolved when I closed all instances of Visual Studio and restarted as administrator.

0
Jul 10 '18 at 20:10
source share

I also ran into this problem in VS 2015, but finally I solved it by following these steps

In VS go to: Tools → Options → Projects and Solutions → Build and Run

Select "Always build" in "At startup, when the project is out of date"

0
Apr 03 '19 at 10:15
source share

This problem happened to me with the latest VS2019.
I tried everything here, but, unfortunately, to no avail.

Finally, I restarted the IIS server and manually redesigned the "default application pool".
After debugging, the problem is fixed.

0
Apr 21 '19 at 18:14
source share

For me, the solution was to run testapp.csproj instead of testapp.sln . This can be selected from the drop-down list next to the green play button.

0
Jun 27 '19 at 6:50
source share

Just an updated Visual Studio, which then suggested restarting the computer. This is what fixed the problem for me.

Note: I tried some of the above / below, but to no avail.

0
Aug 16 '19 at 11:43 on
source share

I solved this problem by clearing the cache of the MEF component.

Use this VS Extension to clear the cache very easily. !!

0
Sep 17 '19 at 8:01
source share



All Articles