Search code examples
c#.netmvvmnugetmaui

Error: One or more duplicate file names were detected. All image filenames must be unique : edupay (Resources\AppIcon\edupay.png


I have a .NET MAUI project built using .NET 6. I am currently trying to upgrade the project to the latest .NET 8 version. I referred to the following link for guidance: Upgrading .NET MAUI from .NET 7 to .NET 8.

After following the steps successfully, there are no issues with the dependencies, and everything appears to be clean. However, when I attempt to rebuild the project, I encounter the following error: Build Error

I have not been able to find any useful solutions for this issue, and my problem remains unresolved. Any suggestions or help would be much appreciated. Thanks!

Tried suggestions of deleting and recreating the images folder in resources/images path, but still getting that error. Also tried to edit MAUI project cs file to include only specific file types by defining like this: <MauiImage Include="Resources\Images*.svg" /> <MauiImage Include="Resources\Images*.png" /> <MauiImage Include="Resources\Images*.jpg" /> Even this is not working and still i see this error.


Solution

  • Delete bin obj folders, and check if there is another image with the same name, you must check your class libraries (.dll) if exist, the name should be once in your entire solution.