Find and remove duplicate entries in csproj file

前端 未结 3 606
生来不讨喜
生来不讨喜 2021-02-10 01:07

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

3条回答
  •  渐次进展
    2021-02-10 01:37

    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

提交回复
热议问题