I'm looking for a way to easily replace all CLR-Type references in a codebase with a few thousand files with their respective alias types, specifically:
I've found this tool AliasBeGone that does it the other way around and is for older visual studio versions and only for a single file at a time. Is there a tool out there that can do what I'm trying to achieve or is it best if I keep trying to make a solution of my own using either a console application or a bash script?
If anyone could point me in the right direction that would be much appreciated.
For the sake of completeness if anyone else has the same issue I'll post this as an answer here.
As shingo pointed out this can be achieved with Visual Studio using a similar popup from a previous answer of theirs.
This popup should appear when you hover over a CLR type and you can replace all occurrences in the solution. If this popup doesn't appear you should check your solutions .editorconfig
file.
Make sure the following lines are included there:
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
Then it should work. If anyone has a better solution please feel free to post it here too.