Archive

Archive for the ‘Visual Studio’ Category

OpenWithTest released on Visual Studio Gallery

June 30th, 2010
Comments Off

Download

Either download from the extension manager by searching OpenWithTest or go to the project page here.

Summary

Open with Test is a Visual Studio extension which serves one simple task: To always open your test files and implementation files together.

Details

When writing unit tested applications (especially while practicing TDD) you will often open an implementation file (i.e SomeClass.cs) followed by the test file(i.e. SomeClassTests.cs).  This extension makes this a one step process.

It works by detecting when you open a new file and attempting to find via convention the test file. It assumes that you create one test file per class.  So, if you create a class called Car in the file Car.cs then you will have a test file named CarTests.cs which tests the car class.

Currently, only C# (.cs) files are supported but I plan to expand this to other files types soon.

Configuration

Out of the box, this extension will assume a file is a test file if it ends with the suffix Test,Tests, Fact or Facts.  However, this can be configured.  To change these go to Tools -> Options -> Open With Test and you will see this screen:


Feedback

I would love to get feedback about features or suggestion so please feel free to leave a comment on this blog post or start a discussion post on the Visual Studio Gallery page.

Snippet Designer 1.3 Released!

June 1st, 2010
Comments Off

I just released Snippet Designer 1.3.


CodePlex Page: http://snippetdesigner.codeplex.com/

Visual Studio Gallery Page: http://visualstudiogallery.msdn.microsoft.com/en-us/B08B0375-139E-41D7-AF9B-FAEE50F68392

The key features of this release are support for HTML/ASP.NET, JavaScript and SQL snippets and a much improved snippet searching experience.

If you already have it installed for Visual Studio 2010 you will get an update in your extension manager for the new version.

Change log

Changes for Visual Studio 2010

  • Fixed bug where "Export as Snippet" was failing in a website project
  • Changed Snippet Explorer search to use a relevance based algorithm which yields much better results
  • Added support for JavaScript snippets
  • Added support for SQL snippets
  • Added support for HTML/ASP.Net snippets
  • Added support for <AlternativeShortcuts> tag
  • Made the color of the snippet replacement highlighting configurable


Changes for Visual Studio 2008

  • Fixed bug where "Export as Snippet" was failing in a website project
  • Changed Snippet Explorer search to use a relevance based algorithm which yields much better results

Snippet Designer 1.2 Beta Release with Visual Studio 2010 Support

January 22nd, 2010
Comments Off

Yesterday I released Snippet Designer 1.2 Beta.

Codeplex Page: http://snippetdesigner.codeplex.com/

Visual Studio Gallery Page: http://visualstudiogallery.msdn.microsoft.com/en-us/B08B0375-139E-41D7-AF9B-FAEE50F68392

This release contains several bug fixes but more importantly it now includes support for Visual Studio 2010.

I am super excited for this since now you can install the Snippet Designer from inside of Visual Studio using the new extension manager. Just open up the extension manager and search for “Snippet Designer”.

image

Then you just need to install it and restart Visual Studio.

image

Enjoy!

Snippet Designer 1.2 Beta Release with Visual Studio 2010 Support

January 22nd, 2010
Comments Off

Yesterday I released Snippet Designer 1.2 Beta.

Codeplex Page: http://snippetdesigner.codeplex.com/

Visual Studio Gallery Page: http://visualstudiogallery.msdn.microsoft.com/en-us/B08B0375-139E-41D7-AF9B-FAEE50F68392

This release contains several bug fixes but more importantly it now includes support for Visual Studio 2010.

I am super excited for this since now you can install the Snippet Designer from inside of Visual Studio using the new extension manager. Just open up the extension manager and search for “Snippet Designer”.

image

Then you just need to install it and restart Visual Studio.

image

Enjoy!

Snippet Designer 1.2 Beta Release with Visual Studio 2010 Support

January 22nd, 2010
Comments Off

Yesterday I released Snippet Designer 1.2 Beta.

Codeplex Page: http://snippetdesigner.codeplex.com/

Visual Studio Gallery Page: http://visualstudiogallery.msdn.microsoft.com/en-us/B08B0375-139E-41D7-AF9B-FAEE50F68392

This release contains several bug fixes but more importantly it now includes support for Visual Studio 2010.

I am super excited for this since now you can install the Snippet Designer from inside of Visual Studio using the new extension manager. Just open up the extension manager and search for “Snippet Designer”.

image

Then you just need to install it and restart Visual Studio.

image

Enjoy!

My xUnit.net Visual Studio Code Snippets

March 2nd, 2009
Comments Off

The xUnit .Net codeplex page lists one useful Visual Studio code snippet for creating a Fact.  As you can tell I am fairly fond of code snippets so I created a few more which I use when writing xUnit.net facts. These are one line snippets that I find very convenient when writing my assertions.

Below is a table which shows the shortcut you use to access the snippet and the code the snippet generates

Shortcut Snippet
ae Assert.Equal($expected$,$actual$)
ane Assert.NotEqual($expected$,$actual$)
an Assert.Null($actual$)
ann Assert.NotNull($actual$)
at Assert.True($actual$)
af Assert.False($actual$)

I have included a zip containing these snippets.   Enjoy!

Author: MattManela Categories: C#, Snippets, Visual Studio Tags:

My xUnit.net Visual Studio Code Snippets

March 2nd, 2009
Comments Off

The xUnit .Net codeplex page lists one useful Visual Studio code snippet for creating a Fact.  As you can tell I am fairly fond of code snippets so I created a few more which I use when writing xUnit.net facts. These are one line snippets that I find very convenient when writing my assertions.

Below is a table which shows the shortcut you use to access the snippet and the code the snippet generates

Shortcut Snippet
ae Assert.Equal($expected$,$actual$)
ane Assert.NotEqual($expected$,$actual$)
an Assert.Null($actual$)
ann Assert.NotNull($actual$)
at Assert.True($actual$)
af Assert.False($actual$)

I have included a zip containing these snippets.   Enjoy!

Author: MattManela Categories: C#, Snippets, Visual Studio Tags:

Snippet Designer 1.1 Released

January 5th, 2009
Comments Off

I just released Snippet Designer 1.1.  This is not a major release but just some bug fixes and often requested changes to make the snippet designer more useful.

 

Some of the most notable changes are:

  1. Languages Service are turned OFF by default now.  Since I was unable to figure out a way to host the C# and VB language services in the snippet editor without causing fake errors in projects I decided to give the users an option to turn them on or off.  If you are ok with the fake error you can turn this back on but since it really annoyed me I have it off.  I plan in a future release to provide some basic color coding outside of the language service so you can at least have color coded code.
  2. Many more aspects of the plug in are now configurable through the options menu under Snippet Designer.  you can now set the location of the snippet index, set preferences for which snippet languages you would like to appear in the snippet explorer.
  3. Several bug fixes to how the highlighting of replacements works and performance improvements with it also.

 

Hopefully these changes will make it much more useful so please download it and try it out here

 

 

The future…

My plans for the future are still up in the air but some of the things I would like to add are:

  1. More bug fixes and more feature enhancements suggested by many helpful users on the Snippet Designer Codeplex page.
  2. Ability to color code snippets without using the language service.  I have a few options here I have been looking at.
  3. Create a website to host snippets and allow you to consume and publish from Visual Studio to this website.

I don’t know how much time I will have to commit to any of these but hopefully I will be able to get more work done on this.

 

Thanks!

Author: MattManela Categories: Personal, Snippet Designer, Visual Studio Tags:

Snippet Designer 1.1 Released

January 5th, 2009
Comments Off

I just released Snippet Designer 1.1.  This is not a major release but just some bug fixes and often requested changes to make the snippet designer more useful.

 

Some of the most notable changes are:

  1. Languages Service are turned OFF by default now.  Since I was unable to figure out a way to host the C# and VB language services in the snippet editor without causing fake errors in projects I decided to give the users an option to turn them on or off.  If you are ok with the fake error you can turn this back on but since it really annoyed me I have it off.  I plan in a future release to provide some basic color coding outside of the language service so you can at least have color coded code.
  2. Many more aspects of the plug in are now configurable through the options menu under Snippet Designer.  you can now set the location of the snippet index, set preferences for which snippet languages you would like to appear in the snippet explorer.
  3. Several bug fixes to how the highlighting of replacements works and performance improvements with it also.

 

Hopefully these changes will make it much more useful so please download it and try it out here

 

 

The future…

My plans for the future are still up in the air but some of the things I would like to add are:

  1. More bug fixes and more feature enhancements suggested by many helpful users on the Snippet Designer Codeplex page.
  2. Ability to color code snippets without using the language service.  I have a few options here I have been looking at.
  3. Create a website to host snippets and allow you to consume and publish from Visual Studio to this website.

I don’t know how much time I will have to commit to any of these but hopefully I will be able to get more work done on this.

 

Thanks!

What annoys me when writing generic functions in Visual Studio…

October 14th, 2008
Comments Off

When writing a generic function I start from left to right (the same way I write most things except when I took Yiddish in college).  For example, Lets say I am writing a simple generic method which return the first element of a generic list. I want the signature of this method to be:

private T First<T>(List<T> list)
 
I start by writing the visibility:
private 

I then need to write the return type so I type T.  The problem is that since T is not defined as a generic type parameter yet so intellisense tries to help me out by showing me all types that begin with T:

image

 

Now my instinct here (every time) is to press space since I just want to move on to the next word since T is all I want.  But space will auto-complete T with ThreadStaticAtrribute.  What I need to do is press esc to close the intellisense window and then press space.  This may seems like a silly issue, but I seem to never remember that I need to do this.

Visual Studio and intellisense have done nothing wrong here , I just wish intellisense had the ability to read my mind and understand exactly what I am intended to do.  It could save me a couple key presses a day!

Author: MattManela Categories: Visual Studio Tags: