Skip to content

Web root is incorrect when using new minimal hosting API (WebApplication.CreateBuilder)  #32415

@DamianEdwards

Description

@DamianEdwards

When using the new minimal hosting API (e.g. WebApplication.CreateBuilder) the web root folder is incorrectly set resulting in static files not working.

Issue seems to be here somewhere as it looks like it's trying to combine a path that's already been combined in the constructor:

WebRootFileProvider = new PhysicalFileProvider(Path.Combine(ContentRootPath, WebRootPath));

@halter73 @davidfowl

Found in version 6.0.100-preview.5.21254.10

Metadata

Metadata

Assignees

Labels

✔️ Resolution: FixedThe bug or enhancement requested in this issue has been checked-in!DoneThis issue has been fixedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbugThis issue describes a behavior which is not expected - a bug.feature-minimal-hosting

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions