Feed Rss



Mar 20 2012

Simple logging with NLog Application logger

category: C#,Logging author:

If you are like me and you rely on trace information generated by your programs to diagnose production issues then you might like NLog.

NLog is a lightweight open source logging library which has worked well for me in the last couple of projects that I have shipped. Amongst many different configuration options that NLog offers, the 2 that I have used mostly are Console logging and Flat text file logging.

Continue reading “Simple logging with NLog Application logger” »

tag:


Jan 12 2012

SVN Externals – Share common assembly code between solutions

If you are like me and you have a similar problem of having to share common in-house library code between various Visual studio solutions and you are using SVN for your source code control, then SVN Externals might be a good option to consider.

In my scenario, I had a class library which contains a lot of utility classes that are shared amongst different applications I write. Before starting a new project, I would typically create a Solution Items / bin folder in the solution directory of the new project and would place the compiled library dll in this folder which gets checked into SVN repo along with the application code. This approach sort of worked but had the following pain points:

  • Before starting a new project, I had to get the latest version of the library code from the repo. Compile it and grab the dll and place it in the solution items folder of the new project.
  • When I added more functionality to the library code, the existing solutions could not benefit from it.
  • I could not debug the library code from within the application solution, unless i used Reflector Pro to decompile the library.

Continue reading “SVN Externals – Share common assembly code between solutions” »

tag: ,


Oct 15 2011

WCF service NETBIOS name resolution woes

category: WCF author:

If you are like me and you’ve:

  • Created a WCF service that is hosted within a windows process.
  • Configured the WCF service in code, instead of a config file.
  • Exposed this service via the internet to a 3rd party (via router port forwarding for initial testing)
  • Used basic http binding.

It all works fine, if you try to generate the service proxy (using svcutil.exe) from the local network, but the 3rd party complains that they can’t. Although they can see the default service help/greeting page when they view it in a browser.

Continue reading “WCF service NETBIOS name resolution woes” »

tag: , ,


Oct 02 2011

Simple async in .net 2.0 & Winforms for “laydevs”

category: C#,Utility Classes author:

If you are like me (a lay-dev) and you swing back and forth between writing .net 4 and .net 2 apps. You are also asked to write simple winform applications from time to time, then this might help just a tad bit.

Like the rest of the world I’m in love with lambdas, extension methods, LINQ and all the cool stuff that was introduced post .net 2.0. So when i am writing in.net 2.0, this is the first pain point. I finally decided to look for a smarter way this time around & found something quite incredible.

Continue reading “Simple async in .net 2.0 & Winforms for “laydevs”” »

tag: , , ,


Sep 30 2011

Clean sources Plus

category: Windows Tools author:

If you are like me and you develop a lot of small Visual Studio Solutions that need to be checked into SVN then you’ll love this tool.

I found it on Jeff Attwood’s site a while ago. Basically, the tool gets the crap out of your solution folder, makes it ideal for you to check in the entire folder as-is into subversion using windows explorer.

Continue reading “Clean sources Plus” »

tag: , , ,


Sep 14 2011

Setting up Git on Windows 7 (64-bit) & Visual Studio 2010

category: Git,Source Code Management author:

If you are like me and you need to set up this environment on your machine then this is what you could potentially do:

Continue reading “Setting up Git on Windows 7 (64-bit) & Visual Studio 2010″ »

tag: , , ,


Aug 28 2011

Console 2 – A tabbed console window

category: Windows Tools author:

If you are like me and hate having four console window icons pinned to your taskbar then you’ll like Console-2.

The four console windows are:

  1. Normal DOS Shell (cmd.exe).
  2. Visual Studio 2008 Command prompt.
  3. Visual Studio 2010 Command prompt.
  4. Git Bash

The first tab when i run the program is the Windows Command shell with the prompt set to >. This gives me plenty of room to type my commands without the directory path getting in my way. To achieve that, i had to go to Edit > Settings > tabs. Changed the title of the default tab to CMD and added the following:

Continue reading “Console 2 – A tabbed console window” »

tag: