posted on Friday, February 01, 2008 11:01 PM by jamesnies

NArrange: Organize Your C# Source Code

So I've been throwing a few hours here and there over the last month into my first open source project...

"NArrange is a tool for arranging .NET source code. This code beautifier allows you to sort and organize C# code members into groups or regions. Currently, only C# source files are supported, but one goal will be to add support for other .NET languages."

If your interested in trying it out, I recommend setting it up as an External Tool for Visual Studio (see the Tools menu). If you pass $(SolutionFileName) as the arguments, it will arrange all writable C# source files in the solution. Otherwise you can supply an individual source file, project or solution to the command line executable. For more information, view the project's readme.txt.

As this tool is still in an Alpha stage, I highly recommend making a backup of your code, or committing any pending changes to revision control, prior to running the tool. One requested feature has been to add auto backup to the tool... I hope to find time to add this functionality in the near future.

NArrange at SourceForge

Looking forward to any feedback,

James

Comments

# re: NArrange: Organize Your C# Source Code @ Monday, February 04, 2008 2:20 AM

There is a similar tool called Regionerate:
http://www.rauchy.net/regionerate/

Nevertheless I will give this one a shot...

Gabriel Lozano-Moran

# re: NArrange: Organize Your C# Source Code @ Monday, February 04, 2008 11:09 AM

Thanks for the info Gabriel. I'll have to try out Regionerate. I had started the NArrange project because I wasn't aware of an open source tool to sort c# code members into regions. However, it looks like Regionerate was recently made open source (i.e. source released 1/1/2008).

jamesnies

# re: NArrange: Organize Your C# Source Code @ Wednesday, February 13, 2008 10:37 PM

Update: The latest alpha release of NArrange provides a backup and restore feature. When the backup option is specified, the tool copies source files into a temp directory before writing arranged C# regions.

jamesnies

# re: NArrange: Organize Your C# Source Code @ Thursday, April 24, 2008 4:39 AM

Update: Visual Basic .NET support has been added in the latest alpha release of NArrange.

jamesnies