diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 2a353c6e5..77941540c 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -236,4 +236,28 @@ For troubleshooting purposes, a blank splash screen can be generated if you don' Generating a blank splash screen will override any custom splash screen and will cause app store rejection. However, it can be a useful approach in testing to ensure that your app UI is correct. +## Duplicate image filename errors + +You may encounter build errors about duplicate image filenames: + +> One or more duplicate file names were detected. All image output filenames must be unique. + +This can occur for `MauiIcon` and `MauiImage` items. For example, the following `MauiImage` items in an `` node in your project file will result in this error: + +```xml + + +``` + +This occurs because from .NET 8, .NET MAUI checks to ensure that there are no duplicate image resource filenames. + +If you receive this build error it can be fixed by ensuring that your project file doesn't include duplicate images. To do this, change any `MauiIcon` or `MauiImage` that references a specific file to use the `Update` attribute instead of the `Include` attribute: + +```xml + + +``` + +For information about MSBuild item element attributes, see [Item element (MSBuild): Attributes and elements](/visualstudio/msbuild/item-element-msbuild#attributes-and-elements). + ::: moniker-end diff --git a/docs/whats-new/dotnet-8.md b/docs/whats-new/dotnet-8.md index fdf41c21f..ec1126b59 100644 --- a/docs/whats-new/dotnet-8.md +++ b/docs/whats-new/dotnet-8.md @@ -33,6 +33,7 @@ For information about what's new in .NET 8, see [What's new in .NET 8](/dotnet/c - The , , , and objects that accompany drag and drop gesture events each gain a `PlatformArgs` property. This property provides access to the platform-specific arguments for a drag or drop event. For more information, see [Recognize a drag and drop gesture](~/fundamentals/gestures/drag-and-drop.md). - For troubleshooting purposes, resource generation can be disabled. For more information, see [Disable image packaging](~/troubleshooting.md#disable-image-packaging), [Disable splash screen packaging](~/troubleshooting.md#disable-splash-screen-packaging), [Disable font packaging](~/troubleshooting.md#disable-font-packaging), and [Disable asset file packaging](~/troubleshooting.md#disable-asset-file-packaging). - For troubleshooting purposes, a blank splash screen can be generated. For more information, see [Generate a blank splash screen](~/troubleshooting.md#generate-a-blank-splash-screen). +- Resizeter checks for duplicate image filenames. For more information, see [Duplicate image filename errors](~/troubleshooting.md#duplicate-image-filename-errors). The following types or members have been deprecated: