Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async Main with multiple entrypoints #26315

Closed
vsfeedback opened this issue Apr 21, 2018 · 11 comments
Closed

async Main with multiple entrypoints #26315

vsfeedback opened this issue Apr 21, 2018 · 11 comments
Labels
Area-IDE Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone

Comments

@vsfeedback
Copy link

I have three console apps in a project with Main entrypoints. I changed one of them to be "async Task Main". Now, when I go into the project properties, the one that I set to async no longer shows up in the "Startup object" application setting. The two that I left alone still show up.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/235706/async-main-with-multiple-entrypoints.html
VSTS ticketId: 602403

These are the original issue comments:
(no comments)
These are the original issue solutions:
(no solutions)

@jinujoseph jinujoseph added Bug Area-IDE Developer Community The issue was originally reported on https://developercommunity.visualstudio.com labels Apr 21, 2018
@jinujoseph jinujoseph added this to the 15.8 milestone Apr 21, 2018
@jinujoseph jinujoseph added the help wanted The issue is "up for grabs" - add a comment if you are interested in working on it label Apr 21, 2018
@JieCarolHu
Copy link
Contributor

I cannot repro this issue on the latest 15.7.6

image

@JieCarolHu JieCarolHu added the Need More Info The issue needs more information to proceed. label Aug 7, 2018
@jinujoseph
Copy link
Contributor

Closing this issue as no repro, pls revert if it repros with latest VS .

@sharwell
Copy link
Member

This issue concerns this dropdown:
image

@aktxyz
Copy link

aktxyz commented Feb 29, 2020

in case anyone else runs into this ... you can manually add this to your csproj file and get passed this issue

<PropertyGroup>
   ... 
   <StartupObject>Name.Space.ClassWithMain</StartupObject>
   ...
<PropertyGroup>

@ismaelhamed
Copy link

VS: 16.5.0 Preview 4.0
.NET: 4.8

Startup object's dropdown-list doesn't work with an async Task Main method, it shows empty (see @sharwell comment). If I change its signature to void Main, then it shows up.

@JulienLynge
Copy link

Confirmed with 2019 16.4.5.

@aktxyz's solution sort of works, but when I switch between startup objects it likes to remove the async one. So it works if you're willing to go into the xml and keep pasting it - not a real solution, unfortunately.

@aktxyz
Copy link

aktxyz commented Apr 22, 2020

it wouldn't be a good work around without an annoying side effect ... for the longest time I could not figure out why it kept reverting but eventually found what you found

@ghosttie
Copy link

ghosttie commented Apr 7, 2021

In Visual Studio 16.9.3

public static async Task Main(string[] args) {

Still doesn't show up in the property page and if the csproj is edited to set <StartupObject> manually, there's a CS1558 'Program' does not have a suitable static 'Main' method error.

@ghost ghost added the fabric-bot-test Testing the impact of changes to the fabric bot label Aug 10, 2021
@ghost ghost closed this as completed Sep 16, 2021
@ghost
Copy link

ghost commented Sep 16, 2021

Closing this issue as we've seen no reply to the request for more information. If you are able to get the requested information, please add it to the issue and we will retriage it.

@jaredpar jaredpar reopened this Sep 16, 2021
@jaredpar jaredpar removed Need More Info The issue needs more information to proceed. fabric-bot-test Testing the impact of changes to the fabric bot labels Sep 16, 2021
@github-project-automation github-project-automation bot moved this to InQueue in Small Fixes Oct 22, 2024
@CyrusNajmabadi
Copy link
Member

Fixed with #75808

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2024
@github-project-automation github-project-automation bot moved this from InQueue to Completed in Small Fixes Nov 29, 2024
@dotnet dotnet locked and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-IDE Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
Status: Completed
Development

No branches or pull requests

10 participants