Removing all unused references from a project in Visual Studio projects

前端 未结 14 2078
北荒
北荒 2020-11-29 16:41

I just wondered if it possible within various Visual Studio versions to automatically remove all references from a project that were never been used?

In your answer,

14条回答
  •  悲&欢浪女
    2020-11-29 17:31

    For Visual Studio 2013/2015/2017 there is an extension that does exactly what you want: ResolveUR. What this basically does is:

    • reference is removed in the project
    • project is compiled with msbuild
    • check for build errors
    • restore removed references if there were build errors.

提交回复
热议问题