Creating, debugging, and executing a CodeFixProvider to fix a compiler warning
Code fix providers are IDE extensions to fix diagnostics in source code, which are reported by compilers and/or analyzers. These are built on top of Roslyn's Workspaces layer and operate on the current document being edited. When the user invokes a command such as Ctrl + dot in Visual Studio editor, the IDE code fix engine computes all the diagnostics in the current line span and identifies all the code fix providers that have registered to fix one or more of the reported diagnostics. Each of these code fix providers are then invoked with a code fix context containing the current document, diagnostics, and span. Fixers operate on the underlying syntax tree associated with the document by adding, removing, or editing the syntax nodes within the tree, and returning the new document with the fixed code. They might also alter the contents of the containing project or solution to fix the diagnostic. When the user commits...