Debugging Windows Services using an #if Directive

Debugging Windows Services – I love writing them. In fact, to encompass a unit of functionality in a self contained bit of code is incredibly powerful. That is, if it is written correctly. I think it is something we as programmers take a bit for granted. One thing I know, is that debugging a Windows Service is one of the most painful things ever. Give it a try… Create a Windows Service in Visual Studio (I’m using Visual Studio Ultimate 2012), start it in debug mode and take a gander at the error message you get.

(more…)

Continue ReadingDebugging Windows Services using an #if Directive

The Daily Six Pack: November 24, 2012

Sometimes getting  old apps to work are riddled with reference errors. While researching this, I came across an excellent post by Pradeep Adiga. Here is the link, and The Daily Six Pack. Enjoy! How I fixed “Could not load file or assembly ‘Microsoft.sqlserver.smo, version=10.0.0.0′” issue, Pradeep Adiga Getting started: TypeScript…

Continue ReadingThe Daily Six Pack: November 24, 2012

The Daily Six Pack: November 23, 2012

Another Friday, another Week-end, Another daily dose of The Daily Six Pack. C# to Objective-C - Part 1 : Strings, Stephen Zaharuk C# to Objective-C - Part 2 : Arrays, Stephen Zaharuk What Programmers Say When Their Programs Don’t Work, Alfred Thompson Keyboard shortcuts for Windows 8, Ibrahim Kivanc Windows…

Continue ReadingThe Daily Six Pack: November 23, 2012

Backwards Compatibility of SQL Server Management Objects (SMO)

Visual Studio Add Reference SMORecently I had an issue where a Web Application stopped working when a SQL Server Migration took place. The SQL Server was moved to a new physical server, but in addition to that they upgraded SQL Server from 2005 to 2008 R2. The problem turned out to be the SMO references in the source code. All applications written referencing previous versions of SMO need to be changed to reference the new SMO DLL’s.

(more…)

Continue ReadingBackwards Compatibility of SQL Server Management Objects (SMO)

Calling a .NET DLL From VBScript

Visual Studio 2012 New Class Library ProjectRecently I have had to call a .NET Dll from a VBScript. Why would I need to do this I hear you ask? Well sometimes it is easier to do certain things in .NET or you might have previously written functionality in a .NET DLL that you now need to duplicate in the VBScript. That was what I was faced with. I didn’t want to have to re-write code, and I make no excuses for being lazy. So I decided to try and find a way to call a .NET DLL from a VBScript.

This turned out to be much easier than I had initially thought. In order to illustrate this, fire up Visual Studio and create a new Class Library Project.

(more…)

Continue ReadingCalling a .NET DLL From VBScript