how to build project on net maui c# android phone without failing?

joe puhich 101 Reputation points
2024-11-08T22:18:20.74+00:00

NET MAUI c# android phone. i clean ok. i build without any errors, but the build fails. it says i have a dupilcate file. wha can i do?

This question is related to the following Learning Module

.NET Training
.NET Training
.NET: Microsoft Technologies based on the .NET software framework.Training: Instruction to develop new skills.
15 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pradeep M 4,560 Reputation points Microsoft Vendor
    2024-11-11T04:18:22.1+00:00

    Hi joe puhich,

    Thank you for reaching out to Microsoft Q & A forum.  

    To fix the "duplicate file" error in your .NET MAUI project for Android, first check the Resources folder and .csproj file for any duplicate entries, especially for images or fonts. Clear the solution cache by selecting Build > Clean Solution in Visual Studio, then try rebuilding the project. Additionally, delete the bin and obj folders in your project directory to remove any stale files that might be causing the error.

    Please feel free to contact us if you have any additional questions.    

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.         

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.