What's hot ? (and I mean really ...) - scroll down for more
1).  Code Templating - advanced usage of delegates & generics: my slides & demos are available for download! CodeProject article is also available.

2).  My series "TDD in the eyes of a simpleminded" is in progress(including code!): preface, part1, part2, Q&A 1, Manual Stub .vs. Mock Stub

3).  TDD Workshop: SeeCompass v0.1 and v0.2 are out.
# Thursday, November 15, 2007

Well this is mostly a good backup-post, but heck maybe a few other (VERY COOL) geeks will find it interesting.
Looking for some cool IDE colors\fonts, I came up with this:

[ Regular mode ... ]

ide_colors_regular.png

 

[ Marking the for loop ... ]

ide_colors_marking_text.png

 

[ Output window ]

ide_colors_output.png


I based my colors on ZenBurn.
The font I'm using is Consolas.
Read all about it in Jeff Atwood's post.

You can download MY version here: OrenEllenbogen_DarkSchema.rar (58 KB)

Note: if you're using ReSharper you'll have to disable the "Highlight current line" option. 

Posted by Oren Ellenbogen 
15/11/2007 12:34, Israel time UTC+02:00,     Comments [3]  | 
# Thursday, December 28, 2006

I'm working with Visual Studio .Net for about 4 years now. To be honest, it's one of the greatest IDE I've ever worked with but the amount of memory it consumes simply knocks the best of my computers. I'm currently using VS.NET 2005 with SP1 and the average memory allocation is ~200MB-~500MB. Now, I usually need to see a few solutions in front of me in order to work so from the total of 2G of memory I have, about ~1G is taken by Visual Studio instance(s). That is just too much, developer need some memory for other application you know (aka Outlook).

One of the obvious suggestions in this scenario is to create some sort of "master" solution and thus working with one instance of VS.NET that contains all the projects I need (from all the solutions). That is a good suggestion unless it was so boring to do and simply took too long(let's face it, no one wants to waste about 5 minutes to create some sort of _temporary_ "master" solution each time he needs to see 2-3 solutions in front of him).


I came up with the idea to develop some sort of automatic solution builder with the following logic:

Let’s say I have an open solution X.sln.

Now I’m trying to open Y.sln.

 

The user will be asked if he wants to join X & Y into a temporary "master" solution (Z.sln) and if so:

1). The current open instance of VS.NET will save X.sln.

2). Generate a new solution: Z.sln

   2.1) This solution will contain 2 “Solution Folder” (a new feature in VS.NET 2005):

X solution directory

   Contain all the projects from the original X.sln.

Y solution         

   Contain all the projects from the original Y.sln.

 

The user will have the option to select a “Solution Folder” and set it as the “active solution” (just like you select "active project"). Only the "Active Solution" will be built. I am not sure how useful this feature is, but I believe we do _not_ want to compile all of our projects in this master solution each and every time we build the solution. If you think about it, we usually need the other solutions open just to look at them while we're trying to develop a feature or solving a bug.

  

This will decrease VS.NET memory usage and let me see all of the required data _without_ switching VS.NET instances and most important - no need to "build" the puzzle by hand.

 


Thinking about the constant time usage trade-off, I want to hear from you guys. Would you use this sort of utility? Do you really need it? Do you need any other functionality? Want to help me build it?

Posted by Oren Ellenbogen 
28/12/2006 11:01, Israel time UTC+02:00,     Comments [2]  | 
# Tuesday, December 19, 2006

(Before you start - give a look at C# and XML Source Code Documentation)

So you build up a nice API that everyone can use but you want to provide nice, IntelliSense-enabled comments along with your magical code right?
Let's say I have the class Logger in my "Infrastructure" dll:

/// <summary>
/// Our logger....
/// </summary>
public class Logger
{
   /// <summary>
   /// Log the given message...
   /// </summary>
   /// <param name="messageToLog">The message to log.</param>
   public void Log(string messageToLog)
   {
   }
}

Now, my clients(e.g other teammates) want to use this logger. Adding a quick "File Reference" to the dll and they are good to go. This is great _but_ they also want to see the comments I provided as they type (IntelliSense in action baby). Surprisingly enough, they will _not_ see it "by default":

NoCommentOnLogger.gif

As you can see (well, not see, but that's my case) - we don't see the class comment "Our logger...". The same goes for our Log method:

NoCommentOnLogMethod.gif

Where are my comments ?!!?

Well, it turns out that you should make a small change to make it alright. Say hello to "XML Documentation file". Open the Project Properties, under the "Build" tab there is a little checkbox named "XML Documentation file" - make sure it's checked and you're done!
All you have to do is to recompile the dll and add the reference again (e.g remove & add, Dumb, but works) or manually copy the generated xml file to your bin directory (if CopyLocal = true).

CommentOnLogger.gif     

CommentOnLogMethod.gif

 

Conclusions:

You should always make sure that "XML Documentation file" is checked!
Why providing comments if no one can see them (unless you have access to the code and you make a "Project Reference").

I'm not sure why Microsoft made this checkbox unchecked as default.
Am I missing something here?

Posted by Oren Ellenbogen 
19/12/2006 02:07, Israel time UTC+02:00,     Comments [2]  | 
# Monday, September 11, 2006

We are writing .Net classes that will have to be used by COM objects. Therefore, we had to mark our objects with GuidAttribute and implement an interface that match every method we want to expose. In VB.NET Project, there is a COM Class which my colleague friend, Doron really like and is missing in C# Project. I decided to make a "C# COM Class" template so here you go:

C# Com Class.zip (7.92 KB)

Install:
Put the zip(don't extract it!) in: %USERPROFILE%\My Documents\Visual Studio 2005\Templates\ItemTemplates\

Usage:

1). Open a new instance of VS.NET 2005 and create a new C# Class Library Project.
2). Right-Click on the project -> Add -> New Item...
3). Select C# COM Class.

csharpcomclass.gif

4). Now insert a name, let's say: MyClass.

csharpcomclass_example.gif

* The namespace will be auto' generated by the project's default namespace.

Enjoy.

Posted by Oren Ellenbogen 
11/09/2006 05:02, Israel time UTC+03:00,     Comments [1]  | 
# Sunday, June 25, 2006

Restoring Smart Tags in the C# IDE after installing the C# Language Service (LINQ Preview May 2006):

After installing C# Language Service, you'll notice that Visual Studio .Net starts to misbehave. The IntelliSense and the Refactoring(Resolve, Rename, etc) engine disappears from the menu and do not work even if you try to activate them manually. It turns out that this is a known issue and there is a fix available here.

TIP: Take a good, long, coffee break(or use the time to read C# 3.0 Specification) after running the command devenv /setup /resetuserdata /resetsettings . You'll have a second break when you'll try to run the Visual Studio .Net 2005 again (for the first time). I guess that Microsoft are kind enough to decide when I should(== I must) take a break from code.

[ via Ken Egozi ]

Posted by Oren Ellenbogen 
25/06/2006 01:57, Israel time UTC+03:00,     Comments [0]  |