Episode 14 of Visual Studio Toolbox (Building Extensions with CodeRush) is now live


In this episode I am joined by Mark Miller (live in the studio) and Rory Becker (live via GoToMeeting) of DevExpress. They build a plug-in that enforces naming conventions. We use the GizmoBall solution that I used in the first two episodes of Visual Studio Toolbox. GizmoBall has some methods and public fields that start with lower case letters. The plug-in fixes these issues in literally seconds.

Later in the week, I will talk more about the plug-in and how you can build one yourself. For now, I want to review how to show you how to get it to work.

To use it, the first thing you will want to do is install CodeRush. There are two flavors of CodeRush: CodeRush Xpress, which is free, and the full blown CodeRush. I am going to use the full-blown CodeRush. After installing that, I get the DevExpress menu in Visual Studio.

The next step is to get the plug-in. You can find the plug-in from the Visual Studio Gallery as well as the Extension Manager. Both point to the DXCore community plug-ins page.

Download the plug-in zip file and extract the contents and you will find CR_EnforceNamingConventions.dll. Right-click on the dll and notice that it might be blocked since it came from another computer. Click Unblock.

You now need to put this in a location where CodeRush can find it. In Visual Studio, select DevExpress|About. In the About Developer Express Tools dialog box, select Plug-ins and you will see that the default folder for community plug-ins is Documents\DevExpress\IDE Tools\Community\PlugIns. Copy the dll to that folder. Restart Visual Studio and >you should see an Enforce Naming Convention item on the DevExpress menu.

Now open a solution. I will use GizmoBall. Here is an example of what the code looks like before running the plug-in.

Here is the same code after running the plug-in.

 

Cool, huh?

Comments (0)

Skip to main content