You can invoke the Optimize References command, which will let you analyze all references and remove unused ones. There are other ways of cleaning project and assembly references. For more information about analyzing references, see Analyze and optimize project references The references are shown in the Analyze References window, where you can also remove unused references. You can also see all references (both used and unused) in the selected scope. If necessary, deselect references that you want to keep.Ĭlick Next to remove the selected references. By default, all references are selected for deletion. The Remove Unused References dialog will open.Īll references that have no actual usages in the source code are displayed in a tree view grouped by projects. Right-click the selection and choose Refactor | Remove Unused References in the context menu or press Control+Shift+R and then choose Remove Unused References In the Solution Explorer, select one or more projects, solution folders or the root node of the solution, or alternatively, select the Dependencies node of a project. The operation of removing project/assembly references cannot be undone. When you remove project and assembly references, ReSharper also deletes all redundant namespace import directives ( using in C#, Imports in Visual Basic) that reference namespaces from the removed assemblies. If your project references implicitly loaded assemblies, you can exclude them from cleanup before you start it Before deletion is complete, you will be able to see all references that are going to be removed and if necessary, preserve the ones that you want to keep. You can apply this command on a project, solution folder, or the entire solution. This command allows cleaning up project and assembly references that have no actual usages in your source code.
0 Comments
Leave a Reply. |