Hi @Kalpana
NETSDK1022: Duplicate items were included
For this issue, you can check NETSDK1022: Duplicate items were included.
Starting in Visual Studio 2017 / MSBuild version 15.3, the .NET SDK automatically includes items from the project directory by default. These items include Compile
and Content
targets. This behavior simplifies project files.
However, if you explicitly define any of these items in your project file, you're likely to get a NETSDK1022 build error.
To resolve the errors, try to open the project file (double click your project name, the project file name is {projectname}.csproj
), and then do one of the following:
- Remove the explicit
Content
items that match the implicit ones listed on the error message. - Set the
EnableDefaultContentItems
property tofalse
to disable all implicit file inclusion.
After that, clean and rebuild the application.
Finally, if still not working, try to share your project file(.csproj).
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion