dotnet / dotnet/wpf

App.xaml File names are forced to lowercase

Open
#11,286 1 comment 0 reactions 0 assignees View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Bug Description
When building a WPF project, a runtime error occurs stating that the App.xaml resource file cannot be found.
The root cause appears to be that the file name App.xaml is forcibly changed to lowercase (app.xaml) during the build process.

### Steps to Reproduce

Create or open a WPF project targeting .NET (NET 10).
Build the project.
Run the application.
The application crashes with a resource-not-found error for App.xaml.

### Expected Behavior
The original App.xaml file name should be preserved, and the WPF application should properly locate the resource at runtime.

### Actual Behavior
During the build process, App.xaml is automatically renamed to app.xaml.
As a result, the application throws a runtime error saying the App.xaml resource cannot be found.

### Error Message (Runtime)
Unable to find resource 'app.xaml'.

### Workaround
```
DesktopApp.Production.csproj

DesktopApp.Production.Start

```

```
Start.xaml

```

```
Start.xaml.cs
public partial class Start : Startup
{
[STAThread]
public static void Main()
{
var App = new Start();
App.Run();
}
}
```

```
Startup.cs
public class Startup : StartupBase
{

}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.