woensdag 12 maart 2008

VS.NET 2008: Form designer not working on Windows Vista

I installed Visual Studio.NET 2008 on my Vista workstation at work. I was keen to work with it, but apparently, my workstation had some issues.

When I started VS.NET 2008, and created a new WinForms project, I received the following error when I wanted to open a Form in the designer:

The Service Microsoft.VisualStudio.Shell.Interop.ISelectionContainer already exists in the service container

ISelectionContainer

I've searched a bit on the Internet, and it seems that I was not the only person who was having this problem.
However, nobody seemed to have a solution for this problem, and according to Microsoft, this problem was not reproducable ...

Eventually, I found a website where someone said you had to install SP1 for .NET 2.0 and SP1 for .NET 3.0.
Unfortunately, these service packs are not supported by Vista.

I was however able to install the updates KB110806 and KB929300 and installing these 2 updates, fixed my problem

maandag 28 januari 2008

Debugging the .NET framework

As I've written earlier, Visual Studio.NET 2008 makes it possible to debug code that can be found on a source server.
I think this can be very interesting and I can think of numerous situations where this can be very handy.
Suppose you work in a company that uses an in-house developped framework, and you're building an application that uses this framework.
If you experience some strange behaviour inside your application, you can debug your code and step into the code of the framework to see if the company's framework has a bug.

I've read that Microsoft has setup a source server which contains the debug-symbols of the .NET framework, so, as from this month, it is possible to step into the .NET framework source-code as well!
Setting up VS.NET 2008 to enable this is very simple; you can find a step-by-step guide here.


The Mozilla team also have a symbol server. You can read more about it here

dinsdag 15 januari 2008

Cannot open log for source {0} on Windows 2003 Server

I am writing an application which uses some .NET remote components that are hosted in IIS on a Windows 2003 Server.
When the remote component throws an exception, the exception information should be written to the EventLog on the Windows 2003 Server; however, Win2k3 seems to be a bit restrictive when a component that is hosted in IIS wants to write to the eventlog.
Although the component does not run under the IIS_WPG or ASPNET account (I am using Windows Impersonation), I always received the following exception when the .NET remote component wanted to write something to the eventlog:

Cannot open log for source {0}. You may not have write access. Access is denied

You can get rid of this behaviour and make sure that the error is indeed written to the EventLog by following the steps below:

  • Open the registry on the Win2k3 server using regedit
  • Locate the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog\Application key
  • Find the CustomSD key and append the following string to the existing value: (A;;0x0002;;;AU)

Now, the (impersonated) remote component should have rights to write to the EventLog.

Now, what is the meaning of the string you've just added to the CustomSD key ?

zaterdag 3 november 2007

Castle Windsor and ActiveRecord

I sometimes read blogposts where people mention Castle Windsor and Castle's ActiveRecord, so I decided to have a little peek at these two projects.

Castle Windsor is an IoC container and ActiveRecord is an implementation of the Active Record pattern which internally uses NHibernate.
These projects look very interesting, and I'd like to make use of them in a little hobby-project before using it in a real-world project

Is there anybody who has used one (or both) of these projects in a real world scenario and who wants to share his (or her) findings ?

woensdag 24 oktober 2007

New debugging experience in VS.NET 2008

As I was reading a bit on Bart De Smet's weblog today, I came accros an interesting post where Bart talks about a new 'debugging experience in VS.NET 2008.

It seems that Microsoft will release the source code for the .NET Framework libraries, and that there will be an integrated debugging support in VS.NET 2008.
This means: when debugging your code, it should be possible to 'step into' the code of the .NET framework classes.
I think this is great!

I've also read another interesting thing on Bart's weblog: Bart will be working in the MS HQ's in Redmond, where he'll work on WPF. That must be a great job, and I'd like to wish Bart a lot of succes!

donderdag 18 oktober 2007

MSDN RampUp

Microsoft has set up a programme in which you can take part to gain new or refresh your existing .NET development skills.
This programme is called 'MSDN Ramp Up'. It is an online course with a lot of course material and online virtual labs.

The nice thing about this Ramp Up programme, is that Microsoft has made different 'tracks', which are tailored to the existing experience and knowledge of the student.
There are four tracks available:

  • Aspiring Developer; which is suited for people who have no prior programming experience, but want to learn programming with MS technology

  • Java Developer; this track is for Java developers who want to gain knowledge about the .NET framework and want to learn programming in C#

  • MS Visual Basic 6.0 developer; lets existing VB 6 developers become proficient in .NET and VB.NET 2005

  • MS VS.NET 2002/2003 developer; introduces the .NET 1.x developer with the improvements and changes in the .NET 2.0 framework

If you want to learn more about this programme, or want to take part in it, then visit this website.

vrijdag 28 september 2007

MS LEAP Programme, yet another rant.

A while ago, I received an e-mail with an invitation to take part in the MS LEAP programme.

This looked very interesting, so I asked my employer if I could take that course and if my employer could help me bear the costs.
A few days later, I received the answer that I could and that they (the company where I work) would bear the majority of the cost. \o/

Now, today, I wanted to subscribe but unfortunately, the program is already fully booked. :(

The ranting doesn't stop. :(

donderdag 27 september 2007

Auto-Formatting in VS.NET 2005 does not work anymore

After a harddisk-crash, I had to reinstall Visual Studio.NET 2005.
As I started programming again after it was re-installed, I noticed that the 'auto-formatting' function of VS.NET didn't work anymore ...

This is very strange, and very annoying once you're used to it. I've verified my options, and they're set the way I want too.
The options:

  • Automatically format completed statement on;
  • Automatically format completed block on }

are enabled. However, when I type a ; or a }, the code is not being formatted at all...
When I use the shortcut 'Ctrl + E, D (format document)', my current document is formatted.

I've no idea why this doesn't work anymore. I've just made a fresh install of VS.NET.
Is there anybody who has experienced this 'annoyance' as well, and if so, how did you fix it ?
In other words: if there's anybody out there who knows how to fix it, please let me know. :)

maandag 13 augustus 2007

Cleaning a Keyboard

My keyboard is about 5 years old, and it has been used extensively. During these years, it has become more and more filthy.
Now, I thought the time has come to do something about it. Basically, I had two options:

  • Buy a new keyboard
  • Clean my keyboard

I thought the second option was more of a challenge then just buying a new one.
So, this is what I did.

To give you an idea of how filthy my keyboard actually was, I've made a picture of it:

filthy keyboard

After I took a picture of the layout of my keyboard, I removed all keys from the board. You can imagine that the picture I've taken comes in quite handy when I wanted to place the keys back.

removing keys from keyboard

I've put all the keys in a bucket of water, and cleaned them.
After removing all the keys, the keyboard looked like this:

stripped keyboard

Hmm, this contains a lot of filth as well. I made good use of the vacuum-cleaner to remove most of it.
Then, when all the cleaned keys were dry again, I could put all the keys back to where they belong. The result: a clean keyboard:

clean keyboard

It was quite some work, but, devving with a clean keyboard is much nicer then using a dirty one. ;)

woensdag 8 augustus 2007

C# 3.0: new language features

I've already written a blogpost regarding LINQ and new language features that we may expect in C# 3.0 a while ago.
Since the release of VS.NET 2008 and thereby C# 3.0 is coming closer and closer, I was planning to write an updated blogpost about the new language features in C# 3.0.

However, I've noticed that John Papa has already written an excellent article already concerning the language enhancements in .NET 3.5, so I've decided to just link to that article:

.NET 3.5 Language Enhancements
That's much easier for me, and it saves me some time. :)