Well structured projects in Visual Studio 2005

This might be an obvious thing for some but I have missed its full potential for a while. And thank You Stefan for pointing it out to me.

There is a new feature in Visual Studio 2005 called Solution Folders. These are only a structure-thing and does not effect the namespace or naming of the things in it. The primary use for Solution Folders was probably to hold things common for the whole solution, like snk-files, build-scripts etc.

But another very nice feature is the ability to structure projects within the solution. Say that You have a number of projects (see top picutres to the left). Often You will only be in one project at the time and...

Read More

Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile'

Ran into an old “friend” compiler error…

This error - actual warning, but if you like I have “all errors as warnings” this will stop you in your steps - will occur in Visual Studio 2005 when you point to a snk-file from the AssemblyInfo-file.

Since this was the way to refer to snk-files in VS2003 this will probably happen to you on your first try. There are a lot of people that has written how to solve this, for example http://davidkean.net/archive/2005/08/25/1162.aspx

The solution is to point to the key-file from the properties of the project. However this has to be done by editing the projectfile in a text editor. The article above gives instructions on how to do that.

To do this, following these instructions:

  1. Open the project file (.csproj for C# or .vbproj for VB) in a text editor
  2. Look for the <AssemblyOriginatorKeyFile> attribute within...
Read More

Rock Swings?

Got a new CD this weekend, Paul Anka - Rock Swings. This is so good! And Mr Anka sings great - I can’t believe his over 70 years old.

On the CD he (or someone) has put together some hits from the Rock and Pop world from the last two decades and turned them into Big Band pieces. They are all executed in a way that make you feel that this is the way the song was supposed to sound. I love it.

I realize that some people probably would knock me out for saying so but i really like this. This is one of those recordings that could (and would) have been destroyed if it wasn’t so great musicians, great arrangements etc. Songs like “Jump”, van Halen and “Smells like a teen spirit”, Nivrana would...

Read More

Alone in the office

Today it’s the day before a holiday in Sweden. That means that most people either don’t work at all or that they work half the day.

But …. you’ve guessed it. As a consultant those rules don’t apply. We don’t work half days which I think is a good think - but what I don’t think is a good thing is to be left all alone in the office. I am struggling to keep the tempo up.


Read More


This week I found out that I good friend of mine is dying in cancer.

He has battled one form of cancer during the spring and summer - and actually won over it. So in late august I spoke to him and there were no signs of the cancer. A real miracle if you ask me, because he wasn’t given any good chances.

But all of a sudden, a week ago, the cancer came back - this time in the brain and in a place where nothing can be done.

Cancer really is a terrible decease - it seems to be able to hunt you down even after you think that you have beaten it. In a way it becomes more than a decease, it’s almost as something with a mind of it’s own. I didn’t think I could feel hatred for a decease but I do. I am angry...

Read More

Snow? In Sweden?

Today, and most of all yesterday was the first snowstorm of the winter in the Stockholm-area.

Every, i’m saying every, year we miss this. First the trains is stopped by falling leafs and then, what do you know, snow? Here in Sweden? How can it happen?

people not being able to get home, all busses in the Stockholm area stopped etc) but then again we knew about this storm for about 2 weeks.

Maybe if the busses have had winter tires on, or all other vehicles for tonight).

Anyway, this gets us each year and I am not expecting any co-workers until 10 o’clock today.

Read More

Performance in ASP.NET apps

Read a great article about performance in ASP.NET applications.

However what really caught my eye was the sidebar about performance myths. Read it here.

Some of those were new to me and some old, which but I have so many times tried to explain to customers (such the one about different speed on VB.NET and C#-code). So nice to have a place to point to…

Read More

Clean Query analyser stuff with Notepad

Just another great utility that everybody has at their disposal…

Quite often you will need the columns from a Query Analyser result for further handling, to put as header in Excel or to use in another query. The sad part is that they are not easily captured, if you get the result as a grid you can’t reach them and if you get the result as text they are separated with spaces to the length of the content of each column.

So this is my street/no fuss solution - it might be faster ways of doing this will SQL but this is one way.

  1. Execute the SQL-statement you want the columns for and return the result as text
  2. Select and copy the header row
  3. Paste the header row into a Notepad-document
  4. Search for space (“ “) and replace with two commas (,,)
  5. When done do another search for two...
Read More

Excel - my favorite code generator

I have spent the main part of the last two days compiling SQL-statements with Excel, and it’s actually quite good at it.

With the string functions (concatenate, substring, find and the usual suspects) you can create SQL-statements for a large number of rows quite simply.

I have a large number of strings that need to be manipulated (done with replace) and then all these string needs to be sent to a stored procedure. This stored procedure call is created by concatenating the string from the manipulated column with the SQL-statement to make the call.

When all of this is done it’s just a matter of filling the columns. Works like charm.

Then I needed about 2 hours to muster the strength to run the script, but that’s another story

Read More