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

Extract default ASP.NET port from launch setting profile #222

Merged
merged 5 commits into from
Jan 11, 2022

Conversation

philliphoff
Copy link
Member

Starting with .NET 6, new ASP.NET applications are scaffolded to use a dynamically generated port, rather than 5000 used by earlier frameworks. This change updates our default port logic to sniff the launchSettings.json, extracting the application URL for the "project" profile (i.e. the profile used by the Kestrel host, which is also now the default for ASP.NET applications), and using its port number as the default provided to the user. (The user can, of course, overwrite that value with their own.)

Resolves #214.

@philliphoff philliphoff requested a review from ravipal January 10, 2022 22:51
src/commands/scaffoldDaprTasks.ts Outdated Show resolved Hide resolved
src/commands/scaffoldDaprTasks.ts Outdated Show resolved Hide resolved
@philliphoff philliphoff requested a review from ravipal January 11, 2022 20:06
@philliphoff philliphoff merged commit 36a4b9e into main Jan 11, 2022
@philliphoff philliphoff deleted the philliphoff-net6-ports branch January 11, 2022 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to invoke the application method for a .NET 6 Web API project
2 participants