Welcome to CodeLife Blog, In this article we learn how Code Maid use and works. But before at all I just want you to encourage to subscribe via email to notify every new article posted here.

I. Code maid?

Code maid is a Visual Studio extension that automate to clean and arrange your code according the standard way. It is work to our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding. its remove extra space and unused library and others. This will help you to make you PR approved faster to the tester and QA Code Reviewers. This extension also recommended to many developers.

II. Install Code maid Extensions.

Just go to upper part of your Visual Studio and hit the Extension and Manage Extensions.

When window appeared just select Online and Visual Studio Marketplace and Search Result. but sometime this is default appeared the the window just verify it. Go to Search box in right upper side of the window and Search “Code maid” proceed to download it.

After downloading it their is notification appeared below that you need to close the whole window to apply the changes and Code maid will be continue to download and install and soon will be available it.

After closing it this window will appear in your PC. this is means that Codemaid installing to your IDE.

Just click Modify, means you modify the extension and agree to install Codemaid Extension to your Visual Studio.

When this window appears just wait until finish, this indicate that Visual Studio is now modifying and Code maid is installing to VS extension.

Once completed. just click close.

After All you need to open the Visual studio and open some project to verify that Code maid now install successfully.

This is my Project Solution Explorer. Just right click the .cs file and you can see the icon {} Cleanup Selected Code. But not limited to .cs file or every file you can cleanup. you can select by folder or the entire solution. just refer the image below.

III. Code maid sample cleanup.

Sample of Student.cs Model, here you can see that code maid remove the extra space in the code.

and here in DbContext part also remove extra space and add space to the specified function.

here in my default Controller. Code maid just remove the unused Library and also extra space below.

here my StudentController. code maid is work and arranges it properly. codemaid move library to upper and remove some space it.

Thank you for visiting my blogsite, to make you notify every new update just subscribe your email here:

Latest Post:

Leave a Reply

Your email address will not be published. Required fields are marked *