November 2005 - Posts
Errors when Running VS 2005 Unit Tests
[To keep things on the up and up: I am using beta software and it looks like this is fixed in the release. I am still going to complain because I am still using the beta so I can integrate with Team System.]
Here's a fun one. When you go to run tests in VS 2k5 occasionally an error dialog pops up. The text of the dialog says "Operation is not valid due to the current state of the object." Here's a screenshot:

As if there is only ever one object that has state. And I know which object that is, and how to fix things.
So, how to fix this problem - delete your ProjectName.suo file. First close VS, then delete it, then open your project again. The .suo is regenerated, and you can then run the test.
Here is where I found the solution (with thanks to
Jeff G. for help on this one.)
Swap Control and Caps Lock
I come from a Unix background. Therefore, I like my control to be where caps lock normally is. And just so it's still available, I like caps lock where control is. This is commonly referred to as swapping control and caps lock.
Sun does this all the time. Or at least used to. It's been years since I used one of their systems. On a windows system, this can be accomplished by swapping the functionality of the keys.
This page has all the details you need. Summary for the lazy:
Add a binary registry key called "Scancode Map" at
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout" with the value of "00000000 00000000 03000000 3A001D00 1D003A00 00000000".
Anyhow, swapping the functionality of these two keys does a few things.
- Reduces the distance my pinky travels to hit the control key. I used to use Emacs all day everyday - when you do that, it's essential that the control key is easily accessible. Even in a Windows world, it's still kind of nice since a lot of shortcuts use the control key.
- Reduces the number of times that I mistakenly hit the CAPS LOCK KEY AND END UP WITH A BUNCH OF TEXT IN ALL CAPS.
- Causes other people grief when they try to use my keyboard and end up with a 'S' in their document when all they wanted to do was save something by hitting 'Ctrl+s'.
- Causes me grief because Remote Desktop is crap.
Just so we are clear here, I am talking about the control key at the bottom left of the keyboard. It's the only one I ever use. The one on the right side might as well not even exist.
Errors with WSS 2.0
After installing WSS 2.0 on my system, everything seemed to work fine except Web Parts. None of them would display. The error message was:
Web Part Error: This page has encountered a critical error. Contact your system administrator if this problem persists.
Searching through IIS logs didn't tell me anything. Looking online, I found a few newsgroup articles, and some forum posts about this error. On one forum, it said something about using ASP.NET v1.1 instead of ASP.NET v2.0. I only had the web service extension for 2.0 available, so I needed to go on a hunt for how to install the web service extension for 1.1. This was also fun because I didn't know what I was looking for at the time. But then I found this command on MSDN:
"%windir%\Microsoft.NET\Framework\version\aspnet_regiis.exe" -i
Fill in version with 1.1.xxxyyy and things almost magically work. After I did that, I needed to go in and change the version of ASP.NET that was used for WSS, then everything was dandy.As a side note, there are apparently a good number of options to aspnet_regiis.exe that are useful. This
page has all the gritty details.
More Posts