Javascript intellisense in Visual Studio
Sunday 14 September 2008 at 09:22 amIt's been a while since I played around with any serious javascript coding, but I have been seeing the improvements in Visual Studio Javascript debugging and have been pretty impressed. One of the things I really liked to see was the intellisense support for javascript. Man, if only I had that back in the days when I spend all day hacking javascript.
The question is: how does Visual studio know which libraries to display in the intellisense? The answer is to put a 'jscript reference' (my term) into your javascript file, like this:

You can get this by simply dragging the file from the solution explorer into the jscript file. It can't get any easier than that!
SQL Server 2008 express install madness
Tuesday 09 September 2008 at 11:55 amI happen to use the express editions of Visual Studio and Sql Server on my home computers, more out of a sense of exploration than anything else as I have access to the full versions through work if I wanted them.
After upgrading to the new VSExpress 2008 SP1 bits, I decided I wanted to add the new sqlServer management studio express tool (not installed by default with VS Express when you choose to also install SQLServer). I happily downloaded the advanced package (with tools), ran the setup, and then just sat there dumbfounded by the most complicated installation wizard I've ever seen. Honestly. I had to click around for a while to figure out what I might have to do to get the tools installed. I made the mistake of choosing to 'add additional features' to my existing installation. I happily checked the managment studio option, and proceeded to completely destroy my sql server installation. Well, it was mostly a matter of breaking the 'user instance' feature that Visual Studio uses to manage databases, but nevertheless the installation was broken from that point onward. I tried uninstalling, reinstalling, turning features on and off, and still couldn't get things to work. I couldn't even get the uninstall to finisch correctly.
It seems that I should have chosen the 'upgrade your version of sql server' option, even though I already had sqlServer Express 2008 SP1 installed (via visual studio). For some reason the product managers decided that a version of sql server with the extended tools was an upgrade rather than just adding some features. Seems that the install team forgot this when giving people the option to just add the features to the existing installation. Obviously it's just a bug, but it seems that with such a complicated installation process they're just asking for trouble. It made me really consider recomending xcopy type installations for future products that I'm involved building...
The solution in the end was this: use the windows install cleanup tool to remove the fubaared installer entries in add/remove programs (which said it was successful, but didn't work in this case), and then proceed to wipe EVERYTHING related to visual studio and Sql server off of my box. I deleted the software keys in the registery, and deleted the files from program files folders. Reboot. Then install SQL Server Express 2008 sp1 (with tools) first, then install VS Express 2008 sp1. It seems to be working now.
I'm not a Microsoft basher (love their dev tools), but I have to call this one as I see it: a real failure in the installation process, especially with an SP1 product.
Reset Terminal Services session
Tuesday 09 September 2008 at 10:50 amI'm posting this mostly for my own future reference. Every few months I find I need to kick someone off of a windows server that I help maintain, and I can never remember the commands to accomplish that, so here's the scoop:
For future reference:
Qwinsta - queries TS sessions, to get a session ID
Rwinsta - resets the TS session found with the previous query.
‘query' is another command that does something almost exactly the same.
You can do this remotely by supplying a servername as one of the parameters. I believe these are included by default on xp professional, and 2008 server. Home editions of xp or vista won't have the programs.
Google is your friend. :)