All-In-One Code Framework

This afternoon, while trying to find a sample that would help me create a Shell Extension for Windows Explorer, I stumbled across the All-In-One Code Framework on CodePlex:

http://1code.codeplex.com/

This is not something that I had heard of before, and the initial description of the project warranted some more investigation:

 

  • Are you frustrated by the lack of code samples for a certain programming task?
  • Have you ever struggled to quickly get started with a technique?
  • Have you expected someone to write code samples for you based on your requests for free?
  • Is a one-stop code sample library for all Microsoft development technologies attractive to you?

If your answer is YES to any of these questions, the Microsoft All-In-One Code Framework is for you!

 

After watching the introduction video here, I decided to get it installed.

There are two ways that you can use it, either as a standalone application or as a Visual Studio 2010 Extension.  Due to the fact that the sample application is intended for use with the Express Editions of Visual Studio and because I am a hoarder of Visual Studio Extensions, I opted to install the Extension.

With this installed, you have two ways to access the available sample applications.  The first is from the Tools Menu:

All In One Code 1

Clicking on this brings up this:

All In One Code 3

Where you have the option to filter on keyword, language and technology. 

The second method is to highlight a keyword within your code file and filter on that:

All In One Code 2

There are currently 678 sample applications that span a very wide area.  The people behind this strive to create each sample using C#, VB.Net and C++, as well as for Visual Studio 2008 and Visual Studio 2010, so you should always be able to find sample in the language that you require.  If you can’t, there is also the option to request a particular code sample.

Once you have specified the location that you want to store the downloaded sample applications:

image

You have the option to either download the sample applications as and when you require them, or you can download them all at once.  Also, if an update to an application is published to the CodePlex site, the application notifies you of this, and gives you the option to upgrade.

All in all, I think that this is going to be a useful resource, and I would encourage you to take a look.  Part of becoming a better programmer involves reading other peoples code, and this application gives you access to lots of it.

Essential Visual Studio Addin – CodeRush Express


This blog post is one of a series of blogs on Visual Studio Addins that I use.  To go back to the series index page, click here.

CodeRush Express is a free Addin from a company called DevExpress, and you can find it here:

http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/

This Addin includes things like:

  • Refactoring
  • Navigation
  • Layout options
  • Colourized braces for C#

And many more

Essential Visual Studio Addin – Copy Source As HTML


This blog post is one of a series of blogs on Visual Studio Addins that I use.  To go back to the series index page, click here.

When you are creating blog posts, or editing/adding web pages to a dynamic site, you quite often want to be able to include code, or XML, and have it colourized the same way it appears within Visual Studio.  That is where CSAH (Copy Source As HTML) comes in:

http://copysourceashtml.codeplex.com/

A very nice Visual Studio Addin that creates an HTML div element of the code that you highlight in Visual Studio, all coloured and spaced as in the code window, which you can then paste wherever you want.

Essential Visual Studio Addin – ghostdoc


This blog post is one of a series of blogs on Visual Studio Addins that I use.  To go back to the series index page, click here.


If you use few Visual Studio Addin’s, this should definitely be one of them:

http://submain.com/products/ghostdoc.aspx

To get straight to the point, not mention people “like” commenting their code, but everyone knows that it should be done.  Using a few basics of the English language, this little addin can take something like the following:

public partial class Form1 : Form
{
  public bool IsEnabled { get; set; }

  public Form1()
  {
    InitializeComponent();
  }
}

And turn it into the following:

/// <summary>
/// 
/// </summary>
public partial class Form1 : Form
{
  /// <summary>
  /// Gets or sets a value indicating whether this instance is enabled.
  /// </summary>
  /// <value>
  ///     <c>true</c> if this instance is enabled; otherwise, <c>false</c>.
  /// </value>
  public bool IsEnabled { get; set; }

  /// <summary>
  /// Initializes a new instance of the <see cref="Form1"/> class.
  /// </summary>
  public Form1()
  {
    InitializeComponent();
  }
}

I have noted that it works very well at pulling through comments on base types which you are inheriting from.

Essential Visual Studio Addin – PowerCommands


This blog post is one of a series of blogs on Visual Studio Addins that I use.  To go back to the series index page, click here.

Personally, I think this Addin has a couple of little gems in it, that I quite simply wouldn’t work without anymore, you can download it here:

http://code.msdn.microsoft.com/PowerCommands

All features are enabled by deafult, but you can enable/disable them to suit your needs under Tools | Options | PowerCommands.

This Addin includes things like:

  • Insert Guid Attribute
  • Collapse Projects
  • Edit Project File
  • Remove and Sort Usings

And many more.

Essential Visual Studio Addin – StyleCop


This blog post is one of a series of blogs on Visual Studio Addins that I use.  To go back to the series index page, click here.

When it comes to making sure that all developers in your team adhere to the same coding standards, Microsoft’s Code Analysis is an essential tool.  However, there is nothing to stop developers on the same team using a completely different style.

Enter Microsoft’s StyleCop, available here:

http://code.msdn.microsoft.com/sourceanalysis

This covers everything from the number of spaces at the start of a comment, to the need for all XML comment to contain a correct list of parameters for a method.

Out of the box, there are a few rules that just don’t make sense, but you have full control over which rules are enabled, and which ones aren’t.  The recommendation would be to sit down with your team, and go through each rule one by one, to figure out which ones make sense for you, and them roll out the Settings.StyleCop file to all your team members.

Essential Visual Studio Addin – TFS Power Tools


This blog post is one of a series of blogs on Visual Studio Addins that I use.  To go back to the series index page, click here.

Although not strictly an Addin for Visual Studio, this is a very useful application none the less.  You can find it here:

http://msdn.microsoft.com/en-us/teamsystem/bb980963.aspx

Before installing, make sure that you have PowerShell installed, and while installing, select a custom install.  This gives you the option of adding the “Windows Shell Extension”, which applies a TortoiseSVN style overlay to the files on your file system which you have exported from TFS, indicating their current check out status.