Scott Hanselman

Visual Studio Programmer Themes Gallery

February 7, '08 Comments [50] Posted in ASP.NET | Microsoft | Programming | Silverlight | Tools | Windows Client
Sponsored By

UPDATE: for a great growing community of Visual Studio Styles and Themes. You can create, import and export themes in your browser!

Import and Export Settings Wizard More and more I find myself "skinning and themeing" my Visual Studio development environment in order to stay frosty. It's surprising how changing your theme (fonts, colors, etc.) can re-energize me when I'm having trouble with some problem or motivation.

Here's a gallery of some nice Visual Studio Themes to refresh your look.

Remember to always back up your settings so you can get back to the way things were and have no fear when you're changing your settings. Note also that some of these settings files you'll find out in the wild may (mistakenly) have Keyboard Bindings included. You'll want to selectively import just the fonts and colors that you want and avoid importing over your own custom keyboard settings.

I switched to a darker scheme a while back, as have many others. I also spent a while looking for the perfect font as have others. When you stumble on a 2005 theme that you want ot use in 2008, Tomas has an XSLT to make the transition smoother.

Oren Ellenbogen's Dark Scheme

A lot of the darker schemes like Oren's don't use a True Black, but an "off  black." His theme is very low contrast and uses muted, relaxing colors.


Mike "Blowmage" Moore's Ruby Blue

This is a low-contrast calm schema, but operators and numbers have a little "pop" to them.


Vibrant Borland by Mawi

This one bring backs good memories of writing Borland C++ with OWL and Turbovision, with a little Norton Commander thrown in for fun.



One of the few light-colored themes, Jeff's also uses a custom font to make 0 and O stand out. Note that the white background is more of a paper-colored off-white.


Dave Reed's Jedi Scheme

Dave's schema uses a complete black, and a neon blue. A little intense, but much higher contrast.


Damien Guard's Humane

This earthy theme includes little details like smart fonts and italics.


Tomas Restrepo's Themes

Tomas has done a huge amount of work in this space. You can get seven of his themes here. He's even got a tool to port color schemes from Visual Studio to SQL Management Studio.

Desert Nights

This theme uses the greatest range of colors outside of the Vibrant Ink them, and approaches, but doesn't reach, a number of primary colors.


Garden of Eden

Green, Kermit-green, sea-green, they are all here in this blue-green theme.



Initially similar to many dark themes, this one uses complementary colors to provide contrast between identifiers and keywords, string literals and comments.



A more cheerful dark theme that includes italics for string literals and brighter neons for keywords.


Moria Alternate

This uses Deja Vu Sans Mono as it's font and uses a lot more neutrals and grays outside of the keyword space.


Brad Wilson Dark Visual Studio

A muted, low-contrast theme with blues and purples. Even the yellow is relaxed.


Martin Plante (slimCODE)

Martin likes small text, no ClearType to take advantage of crisp LCD screens. Rather than committing to blue or black he goes for a navy-gray-blue background.


John Lam's Vibrant Ink Port

John's trying for a straight port of Textmate's famous Vibrant Ink. This is a sharp, bright, neo-classic theme. Note his use of Monaco.


Rob Conery - Textmate

This is Rob's take on Vibrant Ink, added Consolas as the font, some bolding, and lowers the contrast a smidge.


Post links your themes in the comments!

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The Weekly Source Code 15 - Tiny Managed Operating System Edition

February 4, '08 Comments [15] Posted in Learning .NET | Microsoft | Musings | Programming | Source Code
Sponsored By

Thanks to Thijs Kroesbergen for the pointer to this week's source. He turned me on to a tiny Operating System written in C# called "Cosmos (C# Open Source Managed Operating System)". As the project says, why? Because it's fun! I wrote a Tiny Virtual OS in C# for an Operating Systems class I took while I was going to school at night.

And so, Dear Reader, I present to you fifteenth in a infinite number of posts of "The Weekly Source Code." Here's some source I was reading this week.

First, I went back and looked at some of my source code from the Tiny OS project. It was written, largely at night, in .NET 1.1. It was for a 10 week (one term) project, and I wrote it all in a weekend so as to have the rest of the term free.

It's pretty horrific to read old source. I would propose that if you can look at old code you wrote and feel good about it that you're either insane, deranged or a really good programmer. One of those three.

Do remember that this project was a tiny Virtual OS. We were given an Instruction Set for our little processor and a format for programs and the goal was to write an OS to run them.

Here's the constructor for my MemoryManager. I'm sure doing a lot of work in the constructor! One of the fun little things I did for this Tiny OS was to swap memory pages as XML Files. It was a little joke because XML was such overkill and overhead for something so nuanced as a memory manager. I figured since I was simulating an OS's behavior using something as high-level as .NET, then why shouldn't I swap fake memory to disk as XML?

I wanted the source for this Tiny Virtual OS to ready like all the psuedo-code we'd been looking at in the Operating Systems books.

Looking back, I think it'd have been cool if I'd made a WinForms host and did a graphical view of memory that would allow folks to see things like memory fragmentation. Maybe I'll do one in WPF or as an XBAP, it'd be a cool learning tool for some of the students I talk to.

public MemoryManager(uint virtualMemSizeIn)
	// Find a size for addressableMemory that is on a page boundary
	virtualMemSize = CPU.UtilRoundToBoundary(virtualMemSizeIn, CPU.pageSize);

	// Size of memory must be a factor of CPU.pageSize
	// This was asserted when the CPU initialized memory
	uint physicalpages = (uint)(CPU.physicalMemory.Length/CPU.pageSize);
	uint addressablepages = (uint)(virtualMemSize/CPU.pageSize);
	_pageTable = new ArrayList((int)addressablepages);

	// Delete all our Swap Files
	foreach (string f in Directory.GetFiles(".","*.xml"))

	// For all off addressable memory...
	// Make the pages in physical and the pages that aren't in physical
	for (uint i = 0;i < virtualMemSize; i+=CPU.pageSize)
		// Mark the Pages that are in physical memory as "false" or "not free"
		MemoryPage p;
		if (i < CPU.physicalMemory.Length) 
			p = new MemoryPage(i, true);
			freePhysicalPages[(int)(i/CPU.pageSize)] = false;
		else p = new MemoryPage(i, false);


Now my OS a trinket, to be clear. Cosmos, on the other hands, is darned interesting. How could you create a REAL OS (meaning an actual bootable OS off of hardware, be it virtual or physical, using IL? You translate the IL to ASM, of course. Very cool and darned clever.

Cosmos includes a compiler (IL2CPU, which is part of Cosmos) that reads the input file (usually the shell) and Cosmos libraries and compiles the resulting IL to x86 code. IL2CPU has a layer for cross platform and we plan to support other processors and platforms, including x64. IL2CPU also supports certain extension methods which allow C# code to interact directly with the CPU, registers, and ports in the kernel. IL2CPU contains some inline assembler, but there are no ASM files that need to be linked in.

Currently IL2CPU first outputs raw asm files (with IL comments) and then processes them through nasm (a free assembler). Later we plan to emit directly to binary.

The scenarios that Cosmos could be used in are very interesting. Because it's easy to write to and easy to build, you could create little mini-OSes with just the features you want. You could make an OS that just does DNS, or just does some REST service. Who knows. (Yes, I know you could also do a stripped down Linux). There is also talk about getting Cosmos to work on the Wii.

The example below is from Indy.IL2CPU.Assembler.X86.Native. As you can see, IL2CPU writes out ASM.

protected override void EmitDataSectionHeader(string aGroup, StreamWriter aOutputWriter) {
    base.EmitDataSectionHeader(aGroup, aOutputWriter);
    if (aGroup == MainGroup) {
          aOutputWriter.WriteLine("section .data");
          aOutputWriter.WriteLine("_start:  ");
          aOutputWriter.WriteLine("; multiboot header ");
          aOutputWriter.WriteLine("MBFLAGS equ 0x03 ; 4KB aligned modules etc., full memory info,  ");
          aOutputWriter.WriteLine("                        ; use special header (see below) ");
          aOutputWriter.WriteLine("dd 0x1BADB002           ; multiboot signature ");
          aOutputWriter.WriteLine("dd MBFLAGS              ; 4kb page aligment for modules, supply memory info ");
          aOutputWriter.WriteLine("dd -0x1BADB002-MBFLAGS  ; checksum=-(FLAGS+0x1BADB002) ");
          aOutputWriter.WriteLine("; other data - that is the additional (optional) header which helps to load  ");
          aOutputWriter.WriteLine("; the kernel. ");
          aOutputWriter.WriteLine("; end of header ");
          aOutputWriter.WriteLine("MultiBootInfo_Memory_High dd 0");
          aOutputWriter.WriteLine("MultiBootInfo_Memory_Low dd 0");

There's lots of methods like this that do the hard work. The orchestration, however, is up in Engine.cs, where assemblies are taken appear via reflection, and their methods are taken apart using the obvious (my psuedo-code):

foreach Type in Assembly
   foreach Method in Type
      ProcessMethod into ASM (via ProcessAllMethods)

Using an interesting ILReader, a useful class in and of itself. Here's a trimmed chunk from ProcessAllMethods that uses the ILReader.

At this point, we've loaded an assembly, got a type, and we're sitting on xCurrentMethod. They take the method, check for some exception handling (I've trimmed that, it's tedious) and they get an OpCode, and then using the current Assembler, they assemble that operation. Lather, rinse, repeat as necessary.

ILReader xReader = new ILReader(xCurrentMethod);
    while (xReader.Read()) {
    if (mInstructionsToSkip > 0) {
    ExceptionHandlingClause xCurrentHandler = null;
    xMethodInfo.CurrentHandler = xCurrentHandler;
    xOp = GetOpFromType(mMap.GetOpForOpCode(xReader.OpCode), xReader, xMethodInfo);
    if ((!xOp.SupportsMetalMode) && mAssembler.InMetalMode) {
      throw new Exception("OpCode '" + xReader.OpCode + "' not supported in Metal mode!");
    xOp.Assembler = mAssembler;
    new Comment("StackItems = " + 
      mAssembler.StackContents.Count + ", 
      Top item = " + 
       (mAssembler.StackContents.Count > 0 ? mAssembler.StackContents.Peek().ToString() : "(empty)"));

There's not a lot of comments in the Cosmos Project, but once you get your head around what they are doing, it's a pretty amazing piece of work, and I can see why they are having so much fun.

From their site at

If you just want to play with Cosmos:

  1. Install the user kit.
  2. Join the discussion list

Other resources:

  1. Read the FAQ.
  2. Subscribe to the Cosmos Blog
  3. Documentation - Most developer documentation right now.
If you are interested in kernel development:
  1. Get source from CodePlex
  2. Read the full requirements. They are pretty basic though, and everything you need except for Windows (For development) is free.
  3. Read Getting Started


About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

MS Deploy - New IIS Web Deployment Tool

February 2, '08 Comments [12] Posted in ASP.NET | IIS | Tools
Sponsored By

Microsoft Web Deployment Agent Service Properties (Local Computer)Months ago, even before I started at Microsoft, I got to talk to some very nice people about a project they were calling AdminX. After I told them that that was very possibly the worst name they could possibly give it (and they took part that very well) we got to dig into what the tool was going to do. As with all great tools it did stuff that we had already written at my last company. It's always nice to throw home-grown tools away if found tools will do the job better.

Anyway, there's a Tech Preview of MS Deploy out for both x86 and x64. It installs a Windows Service, but it doesn't need to be running except when it's doing work so don't panic.

It's got a metric ton (a good thing) of options. For example, if I want to archive/backup a Site, I go:

msdeploy.exe" -verb:sync -source:appHostConfig="Default Web Site" -dest:archivedir=c:\mybackup

You can restore just by reversing source and dest. All the settings are maintained and stored in XML.

There's other "verbs" to use. For example, you can getDependencies (currently only on IIS6, IIS7 to come) and get details on exactly what your app needs in terms of authentication, filters, modules, etc.

You can transfer or 'sync' websites or web servers between each other like this:

msdeploy -verb:sync -source:webserver,targetName=http://computername/MSDEPLOY/ -dest:webserver > msdeploysync.log

Also, because there's a Windows Service involved, you can do remote deploys - that's the part we've all been waiting for. MS Deploy also supports the -whatif flag, showing you what will happen without doing anything. 

There is also a plan to have a PowerShell cmdlet interface for MS Deploy when it releases, so things are looking up in the IIS space.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Firefox, WPF and XBAP

February 2, '08 Comments [27] Posted in Microsoft | Programming | Windows Client
Sponsored By

WoodGrove Finance Explorer - Mozilla FirefoxI finally got around to trying a .NET 3.5 XBAP (XAML Browser App or "WPF Browser Apps") in Firefox, and it works just as advertised. I put together an incredibly useful and powerful application consisting of a picture of me and a button. I think everyone will want to run it. ;)

Seriously though, it's very easy to deploy apps like this. This reminds me of the year I spent working for Aurum (then a division of Baan) creating a large application using VBPs - ActiveX Documents.

These were the same basic idea. Your application would run - then IE4, methinks - using the Browser as it's Window Frame, much the way Word or Acrobat can open up a document inside the Browser. This is all still very old-school ISite COM stuff.

Anyway, XBAPs aren't Silverlight, they are the Full .NET Framework in your browser. With .NET 3.5 that means IE or Firefox. Think of XBAPs as ClickOnce applications that never jump out of the browser.

Keep in mind that mine is a silly example, and yes, this one could be done with DHTML, however the Woodgrove Finance Application (a .NET 3.0 WPF Application, seen above in Firefox) would be more challenging, hence the idea behind WPF Browser Apps.

I fire up VS2008 and hit File | New Project | WPF Browser Application.


Then, I drag an image on the Page and a Button. I use Split Screen View so I can see the XAML being written a the same time. I double-click on the surface, then go back and double-click on the button. That adds the Loaded= and Click= event handlers you see below. I could have typed this manually also.

<Page x:Class="WpfBrowserApplication1.Page1"
    Title="Page1" Loaded="Page_Loaded">
        <Button Height="57" Margin="70,0,70,24" Name="button1" 
VerticalAlignment="Bottom" Click="button1_Click">What a great App!</Button> <Image Name="image1" Margin="50,18,48,96" > <Image.RenderTransform> <RotateTransform Angle="0" CenterX="100" CenterY="100" /> </Image.RenderTransform> </Image> </Grid> </Page>

I'm going to do two things. One, I'll load a picture from an Embedded Resource. I could have loaded it from a location like my web server, but this is harder and educational for me. Then, two, I'll make the picture turn when I push the button. I could add an Animation declaratively but again, this is a little harder and more interesting.

First, getting the embedded graphical resource. This might look familiar if you've done it with WinForms.

System.IO.Stream stream = this.GetType().Assembly.
GetManifestResourceStream("WpfBrowserApplication1.MyFile.jpg"); JpegBitmapDecoder bitmapDecoder =
new JpegBitmapDecoder(stream,
BitmapCacheOption.Default); ImageSource imageSource = bitmapDecoder.Frames[0]; image1.Source = imageSource;

I've made it more lines than is needed, but basically, get the stream, decode the graphic (Gif, Jpeg, PNG) and grab the Frame. If it were a Gif, it might be animated, hence Frames[0].

Ok, easy. Now to make it spin. And not just turn in a chunky way, but smoothly turn 60 degrees with each button press. I make an animation, set a From and To value as a double and tell it to last a half second. Then I grab the RotateTransform off the image and begin the animation.

private int angle = 0;
private void button1_Click(object sender, RoutedEventArgs e)
  DoubleAnimation ani = new DoubleAnimation();
  ani.From = angle;
  angle += 60;
  ani.To = angle;
  if (angle >= 360) angle = 0;
  ani.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500));

  RotateTransform tran = (RotateTransform)image1.RenderTransform;
  tran.BeginAnimation(RotateTransform.AngleProperty, ani);

There's a pile of good articles and books out there on WPF. What strikes me is how many high level it is. It's nice to think of constructs like angle and RotateTransform rather than doing the math.

The silly result of this code is at and it works in both Firefox and IE if you have .NET 3.5 installed.

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

First Half 2008 Conference Speaking Schedule

January 31, '08 Comments [28] Posted in ASP.NET | Speaking
Sponsored By

image Well, I think I've got my schedule down for the first half of this year. Here's what I've got so far.

I'm trying to work out a way to get over to the Middle East to see and talk to Developers over there, unfortunately the flights from here usually take between 21 and 29 hours, as opposed to less than 10 to use Norway as an example. This is really hard on my diabetes (and Norway will be also but it's 1/3 as long) but it's also hard on the family and I need to keep balance. That said, I'm actively working on a way to hang out in EMEA for some time, maybe bring the family along.

I hope I'll see some of you at one of these events!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.