We recently merged two branches of code and ended up with duplicate entries for several of the files in the .csproj file. This seemed to happen to all the files which needed the
In case someone else is looking for a way to do that automatically, I put together a script for this: RemoveCsProjDuplicates.ps1
The script will find all csproj files in the supplied folder, remove all duplicates and save the file.
To use just run
.\RemoveCsProjDuplicates.ps1 -filePath [Solution folder]
Feel free to use and adapt it to your needs