Template: set ASPNETCORE_WEBROOT in launchSettings.json instead of WebRootPath once on net11
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Read the template's Program.cs and launchSettings.json, and confirm the template has moved to the .NET 11 SDK before changing them. Move the ASPNETCORE_WEBROOT setting and its comment into the launch profile, then remove WebRootPath from Program.cs. Done means a fresh clone still starts without wwwroot, while standard web-root overrides remain available.
Written by the indexing model from the issue text.
Description
The template's Program.cs sets the web root in code:
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
Args = args,
// Explicit declaration prevents ASP.NET Core from erroring if wwwroot doesn't exist at startup:
WebRootPath = "wwwroot"
});
Setting WebRootPath there overrides ASPNETCORE_WEBROOT and --webroot, so a project can't point a second instance (for example one run by a tool alongside the dev instance) at a different web root without changing code.
Setting it in the launch profile keeps the fresh-clone protection and leaves the standard override working:
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
// Explicit, so ASP.NET Core doesn't error when wwwroot doesn't exist yet on a fresh clone.
"ASPNETCORE_WEBROOT": "wwwroot"
}
and Program.cs drops WebRootPath.
This needs the .NET 11 SDK. Before it, dotnet run fails to apply a launch profile that contains comments ("'/' is an invalid start of a property name"), fixed by dotnet/sdk#54820 and not backported to 10.0.x. So: once the template moves to net11, move the setting to launchSettings.json, with the comment.
- Dominant language
- C#
- Stars
- 81
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntelliTect/Coalesce
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
IntelliTect/Coalesce#794 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
IntelliTect/Coalesce#781 ·
-
Difficulty 2/5 Under an hour Newbie friendliness 85/100
IntelliTect/Coalesce#774 ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
IntelliTect/Coalesce#799 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
IntelliTect/Coalesce#798 ·
All issues in IntelliTect/Coalesce
Similar issues
-
:watch: Not Triaged dotnet-target-version
Difficulty 1/5 Under an hour Newbie friendliness 84/100
dotnet/docs-desktop#2313 ·
Maintainers usually reply within 4 days
-
dotnet-target-version
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
:watch: Not Triaged dotnet-target-version
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
Project dependencies are outdatedPossibly taken @yasmoradi claimed this today. Opendependencies
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
bitfoundation/bitplatform#15562 ·
Maintainers usually reply within 1 day
-
bug priority:low severity:S3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
squid-farm/talewright#909 ·
Maintainers usually reply within 1 day