Skip to content

Creating a folder in Program Files using Directory.CreateDirectory makes that folder inaccessible #5588

@IviriusMain

Description

@IviriusMain

Describe the bug

Creating a folder in Program Files does not make it accessible in File Explorer as it's lacking the Directory attribute

Steps to reproduce the bug

Use the code below to create a folder inside Program Files - the start menu part can be ignored

Image

Expected behavior

The folder should be visible in File Explorer

Screenshots

No response

NuGet package version

Windows App SDK 1.8 Experimental 2: 1.8.250515001-experimental2

Packaging type

Unpackaged

Windows version

Windows 11 version 24H2 (26100, June 2025 Update)

IDE

Visual Studio 2022

Additional context

Both packaged and unpackaged have this problem in my experience, but this code is currently running in an unpackaged project

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions