Skip to content

BlazorWebView: Use AppContext.BaseDirectory instead of Environment.CurrentDirectory  #21750

@simonrozsival

Description

@simonrozsival

This is a follow up to https://github.com/dotnet/maui/pull/21505/files/2d4a1bdabf24a22b8df1e32d4535ebc89f6f7308#r1557824040

In BlazorWebView in WPF and WinForms code, we're using Environment.CurrentDirectory as the app root directory in the case when the location of the entry assembly is not known. This is the case when the app is published as a single file. We should use AppContext.BaseDirectory instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions