dotnet / project-system

The .NET Project System for Visual Studio
MIT License
969 stars 387 forks source link

Class Libraries show up in debug startup project list #1308

Closed davkean closed 3 years ago

davkean commented 7 years ago

This list is supposed to show projects that can be launched (so the user can quickly switch start up projects), neither of these projects can be launched:

image

basoundr commented 7 years ago

Blocked by VSO bug 389597

JohannZhu commented 4 years ago

Any updates on this issue? Finding one single executable project from dozens of projects is not funny... And I know some teams have hundreds of projects...

moginheden commented 4 years ago

I'm not sure if this is the same bug, but I was directed here when trying to figure out why my web project is NOT in the startup list, (but, a CLI and a Windows application are.)

mmihaly commented 4 years ago

We're migrating to .Net Core, and this is very annoying, hopefully it gets fixed soon.

davkean commented 4 years ago

We need to do two things:

1) Unregister the existing debugger launch providers that we're not using via the opt out here: https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/219892. This will also fix https://github.com/dotnet/project-system/issues/6140. 2) Make our debug launch provider actually provide a useful result from IsDebuggableAsync, or implement it terms of another method.

4lexKislitsyn commented 4 years ago

Additional information: VS2019 doesn't show .NET Framework's Class Library projects. So it excludes .NET Framework ASP.NET projects.

It's problem when you have solution with .net core and .net framework ASP.NET projects.

jjmew commented 4 years ago

This is a top feedback item hence giving it high priority

davkean commented 4 years ago

Reopen based on the revert here: https://github.com/dotnet/project-system/pull/6402.

mmihaly commented 3 years ago

This bug somehow got into the 16.10 versions...

drewnoakes commented 3 years ago

@mmihaly could you provide some more details on how to repro please?

Ping @ocallesp

mmihaly commented 3 years ago

Repro steps:

  1. Create a blank solution
  2. Add a .NET 5 C# console project to the solution
  3. Add a .NET 5 C# class library to the solution

As the original post mentioned, the class library project is shown in the startup projects dropdown, when only the console app should: image

It's not a big deal for small solutions, but we have a solution with more than 100 projects, only a few can be launched and it's quite annoying to find them in the dropdown.

Attached is a sample solution with the above projects.

@ocallesp

ConsoleApp.zip

drewnoakes commented 3 years ago

@mmihaly thank you very much.

Reopening and sending back to triage.

jjmew commented 3 years ago

@ocalles can you please take a look?

f-i-x-7 commented 3 years ago

Hello, any updates on this? My solution has about 200 projects. Yesterday I updated VS from 16.9.4 to 16.10.4 and now I see all these 200 projects in startup list in toolbar. This is very painful regression bug, is there any chance that it will be fixed e.g. in 16.10.5 version?

drewnoakes commented 3 years ago

@ocalles can you look into this asap so we can get it fixed for 16.11.

drewnoakes commented 3 years ago

@ocalles I believe this is fixed in #7429. Can you take a look at that PR on Monday please?