Vb.net considered harmful

I have once again been forced into using VB.NET which I am not very fond of.

My points up to now has been that the language in itself is not that bad. But the support (refactoring etc.) in Visual Studio is much worse than for C#. Also, there is a culture in the VB.NET community (as I understand) to hide complex stuff from your user. So for example you cannot see the references you have in your project until you hit “Show all files”. Another example for the sub-par support you get when using VB.NET.

My final point up to now is that the most common reason to chose VB.NET over C# is that you have VB6-programmers that is to be converted into VB.NET programmers. The problem is that VB.NET automatically (yeah, you can and SHOULD turn it off) include the Microsoft.VisualBasic in all new projects....

Read More

SOAPUi and others – regression testing services

I been looking around for some way of (regression)testing the WCF service we will build in my current project. I will not write another client and be forced to maintain it during the project. This took loads of time the last time I tried it. The thing I will settle on is SOAPUi, which seems just awesome. I have already written about it – but didn’t get the time to try it for real. I sure will now! But there are others – many of the free. Just see for yourself. A nice complement is WSDLDisco that creates a portal for your services. This is a way to open up for ad-hoc testing for project members that not is comfortable with XML or concepts as requests/responses.

Read More

Resolving with Unity and Policy Injection using extension methods

I actually thought that this was going to be a small thing. The Unity application block is Microsoft’s IoC-container, part of the Enterprise Library. The Policy Injection application block (PIAB) is Microsoft’s AOP framework, also part of the Enterprise Library.

You’d think that it would be easy to integrate the two… But it’s not… that simple. Actually that is stranger than it first sound because apparently they are calling each other internally.

OK – I want it to be easy to combine them, so I have written two extension methods of UnityContainer that make it easer.

Here is the extension methods:

And here is some tests showing the usage:

Of course I haven’t thought this out by myself. That takes time. I want things fast. So I steal ;). Thanks goes to this blogpost...

Read More

System.BadImageFormatException Could not load file or assembly System.Data.SQLite

I ran into this problem when I tried to re-open a solution I did a while back when labbing with Fluent NHibernate and SQLite.

Behind the cryptic error message lies and easy solution; I was running the 32-bit version of the SQLite-driver and runtime. That’ doesn’t fly on my Windows 7 64-bit machine.

Here is a more through description and here is a link to the latest version of SQLite that will get you all the version (32 and 64 bits) of the SQLite.

Read More

Synchronization for consultants – it works!

I am so proud. My evil scheme to keep my calendar(s) in sync got tested for real today.

Got to new customer. Installed Outlook to Google Calendar. Started Outlook. Viola! All my events from my other calendars in place with the ones from my customer. So now they will not book me on days when I have other assignments etc.

The only thing is that you cannot think to much about it because it will drive you mad. My customer Outlook is synched with Gmail, my Avega outlook is also synched with the same account to Gmail. My phone synchs to Gmail… But it works. ‘Nuff said.

Read More