Sort and remove (unused) using statements Roslyn script/code? I\'m looking for some .NET/Roslyn (compiler as service) code that can run through a project and sort and remov
Check out the OrganizeSolution sample project that came with Roslyn. It does something similar to what you want. It does the sorting part. You'll have to also use the SemanticModel like Jeff shows to determine if there are no references to a particular namespace in the source.