Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

VS 2015: Unable to start debugging. The startup project could not be launched. #521

Closed
srkinyon opened this issue May 23, 2016 · 36 comments
Closed

Comments

@srkinyon
Copy link

srkinyon commented May 23, 2016

After installing the new Asp.net Core 1 Tooling preview to VS 2015, created a new project from the template for .NET Framework. When running the project (Start button or F5), received the old dreaded dialog "Unable to start debugging. The startup project could not be launched...."

image

The startup project is selected and bold. It was this way when the solution opened and right-click "set" didn't help.

Other facts & symptoms:

  • In the Debug menu, Start Debugging and Start without Debugging are both disabled.
  • The new project builds successfully.
  • The command line 'dotnet run' works and the site can be navigated to.
  • Other projects still run in VS 2015 (both MVC & WPF) - they still work & can be run in debug. Only the new Core projects have this behavior.
  • Tried multiple new projects without success. The problem appears to be with the template or other elements of the Core tooling.
  • Ran VS2015 as administrator and not, both have the same results.
@sayedihashimi
Copy link
Contributor

TFS: 224822
I've added this to our internal TFS, we will reply back here soon.

@srkinyon
Copy link
Author

More facts & symptoms:

  • F12/Go to Definition didn't work for WebHostingBuilder or other new Core constructs.
  • References is empty but Dependencies is full. Again, compiles & runs successfully using 'dotnet run'.
  • Was missing some patch, applied by way of the uninstall/change panel. The update didn't specify what version it was at or what it was going to.
  • Fully uninstalled tool preview, rebooted, reinstalled. No change.
  • Fully uninstalled & reinstalled Visual Studio & Tools preview, then reinstalled VS & Tools preview. Emptied %temp% along the way. No change.

Attached logs on reinstall as a zip.

dd_DotNetCoreTools__20160525095446.zip

@balachir
Copy link
Contributor

balachir commented Jun 9, 2016

@srkinyon can you check if Add/Remove programs has the entry for "Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1"? Also can you share a screenshot of your VS Help-About - is there an entry for "Microsoft .NET Core Tools (Preview 1)"? We'd like to check if everything looks to be installed properly.

@srkinyon
Copy link
Author

srkinyon commented Jun 10, 2016

Both screenshots show it is installed. Note that I had ASP.NET 5 RC 1 installed previously. I stood up a temp machine with a fresh install of VS2015 and the tool preview worked there with no issues. My thought is that the problem my main development machine is having is due to the prior RC 1 install.
vs2015-asp net-core-rc2-img1

vs2015-asp net-core-rc2-img2

@cilliemalan
Copy link

I'm getting the same problem on a brand new PC. Never had RC1 installed.

@barrytang
Copy link

Can you check if the startup project is set? The bold one in Solution Explorer.

@srkinyon
Copy link
Author

srkinyon commented Jun 16, 2016

From the original post, 2nd paragraph: "The startup project is selected and bold. It was this way when the solution opened and right-click "set" didn't help." I'm very confident this isn't a lack of reading instructions from the dialog box image I posted. ;)

@srkinyon
Copy link
Author

This is unsolved in the latest preview 2 release. I'm unimpressed to say the least that I can't use the new ASP.NET with Visual Studio 2015. Not solved in the next release, no workarounds, no attempt to solve it really. So will this product only be marginally supported sometimes, like when the problems are easy?

@barrytang
Copy link

Hi @srkinyon, @BillHiebert looked at the issue and confirmed it is related to VS output window creation which isn't owned by my team. I am following up with the VS IDE team to see if this is a known issue and whether there is any workaround. Apologize for the inconvenience and I will update you as soon as I hear back from the VS IDE team.

@srkinyon
Copy link
Author

Can you provide a work around? Or maybe a way to fully uninstall it? It appears it is manually altering something and it is surviving an uninstall/reinstall (I uninstalled the whole VS and it still happens).

I can't see this being an Output Window issue, but I'll take your word for it. The fact that the References are blank and the Intellisense isn't working would seem to indicate something isn't registered correctly.

@fabioes
Copy link

fabioes commented Jul 3, 2016

Try to uninstall all previous version of .NET Core and install the newer version...It works for me.

@vimception
Copy link

I'm seeing the same same problem. @srkinyon my workaround is currently to run VS15 as Administrator.

@srkinyon
Copy link
Author

srkinyon commented Jul 4, 2016

I uninstalled older versions prior to installed the newest version. And I tried running as Admin again - no change. It would appear a change happened on a system level and that change both survives uninstall and isn't impacted by security (at least for me).

@jdrobison
Copy link

@srkinyon, @langsweirdt: there's not a lot to go on for figuring out whether this is related to the Output window, but I have a few questions that may lend some clues:

  1. Can you send a screenshot of your IDE when you're experiencing the problem?
  2. If build is working, are you seeing build output in the Output window?
  3. What's in the "Show output from:" dropdown in the Output window?
  4. Do you still see the problem if you run VS in safe mode (devenv /safemode)?

@srkinyon
Copy link
Author

srkinyon commented Jul 5, 2016

#1 Attached.

#2 “If build is working, are you seeing build output in the Output window?”

  • I see what looks like standard output with ‘Build’:
    1>------ Rebuild All started: Project: HelloWebFull, Configuration: Debug Any CPU ------
    1> C:\Program Files\dotnet\dotnet.exe build "C:\Projects_Testing\cli-samples-master\HelloWebFull" --configuration Debug --no-dependencies --no-incremental
    1> Project HelloWebFull (.NETFramework,Version=v4.5.1) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
    1> Compiling HelloWebFull for .NETFramework,Version=v4.5.1
    1> Compilation succeeded.
    1> 0 Warning(s)
    1> 0 Error(s)
    1> Time elapsed 00:00:01.3121388
    1> (The compilation time can be improved. Run "dotnet build --build-profile" for more information)
    ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

#3 “What's in the "Show output from:" dropdown in the Output window?”

  • Only Build & Build Order while in Safe Mode.

#4 “Do you still see the problem if you run VS in safe mode (devenv /safemode)?”

  • Just tried, not difference (see image).

vs2015-asp net-core-fail

@jdrobison
Copy link

Could you capture a dump of the VS process using Task Manager? (Let me know if you need detailed instructions.) Once you have it, could you share via OneDrive, Dropbox, etc.?

@srkinyon
Copy link
Author

srkinyon commented Jul 6, 2016

@MTBandolier Let me know when you've downloaded it. I didn't see anything in it that can't be public, but I'm going to remove it once you have it: https://www.dropbox.com/s/ctrghumoszbd2f8/devenv.zip?dl=0

@jdrobison
Copy link

jdrobison commented Jul 6, 2016

@srkinyon, got it. Thanks!

And just to confirm, this dump captured the process when you're in the state where you can't start debugging?

@acrigney
Copy link

acrigney commented Jul 7, 2016

Running as administrator and uninstalling the RC2 version did not work for me.
Hopefully this will be fixed soon?

@taylorlowery
Copy link

Just uselessly chiming in to say that I'm having the same issue and I'm sad about it. I tried the same uninstall/reinstall/nuke it from orbit things seen above, to no avail :(

@SoulFireMage
Copy link

I've got this issue and all I did was start VS in Administrator as I needed that to run IIS express such that my colleague could access the test site from his computer.

@Joshuagollaher
Copy link

I fixed it, this was happening to me when trying to run a node.js project. I was messing around, and I went to Debug->Options->Projects and Solutions and turned show output window when build starts off.

@RationaleIT
Copy link

I'm also having this issue, although I am not sure what has caused it. It was working fine the other day and now it isn't. Windows did a few updates and I also installed the github extension for VS2015 and since then it seems to have stopped working. Have tried uninstalling and reinstalling VS2015 Tools Preview 2 to no avail. Any suggestions?

@RationaleIT
Copy link

So, just an update. Downloading the latest windows updates (Windows 8) and restarting the computer seems to have fixed the issue.

@gusmanb
Copy link

gusmanb commented Sep 29, 2016

I'm having this same problem, but I'm on Windows 10 and it seems like it happened when the anniversary update has been installed, previous to that it worked for me...

Any ideas?

@gusmanb
Copy link

gusmanb commented Sep 29, 2016

Ok, for me the problem was a recent change on the solution.
In my solution I have a framework I'm developing with two variants, one for .net core and other for .net.

It happens that a library project exists on both versions of this framework and the project name is the same, and even if the frameworks are on different folders it seems it was taking the wrong one.

The structure was like this:

-Solution's root
|
-----MyLib project (.net)
|
-----Core
.........|
.........|-----MyLib project (.net core)
.........|
.........|-----Test project (.net core)

I first tried to rename the assembly name and project name with no result, after that I removed the .net library and it started to work, but the reference was showing the old package name. I had to rename the library's folder and finally it set the correct reference name and after that I readded the .net library again and it still works.

The worst of all is that vs told me the compilation was correct every time I tried to compìle the app but it wasn't really compiling it I assume.

So it seems like here exists two bugs: .net core compilation (at least under vs) is resolving the wrong references and compilation some times even if it fails reports a correct result (or may be the app was compiling but the debugger could not start the program? not sure).

Cheers

@valterekholm
Copy link

Hello. I'm quite new in VS but I can share that I had this message too, but it got solved after help - and by removing to references that didn't belong in .net core... Identity och WebApiCompatShim. My mistake.

@leonardobaggio
Copy link

@valterekholm I've came across this error today, and solved by running VS2015 as Administrator.

I still have no idea why this happened.

@jkicha
Copy link

jkicha commented Dec 23, 2016

I am on Windows 10 with .NET Core 1.0.1 SDK 1.0.0-preview2-003131

This solved the above problem for me.

http://stackoverflow.com/questions/37612888/unable-to-start-debugging-the-startup-project-could-not-be-launched-vs2015

"All was solved by deleting CurrentSettings.vssettings".

@srkinyon
Copy link
Author

Fixed! If there was a prize, @jkicha would have gotten it! Thanks for all the posts, this issue (as least for me) is closed. It is fixed just in time for VS2017....

@reticulan
Copy link

Getting this problem in WPF project on VS 2015 after changing russian language to english.

@NicoJuicy
Copy link

Run Visual Studio 2015 as Administrator and then open your project :)

@ze555
Copy link

ze555 commented Apr 24, 2017

easy solution for it
go >> C:\Users\username\AppData\Local\Microsoft\Phone Tools
delete folder CoreCon
start now your visual studio

@hadevnet
Copy link

it's very strange but just you need to run this commend :

  • dotnet restore
    and restart visual studio.

it works!

@SimonCropp
Copy link

this still happens in VS 2017. can it be reopened

@barrytang
Copy link

To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests