I ran into an issue with a Windows Azure project created from scratch in Visual Studio 2010 Beta 1 with the May CTP of the Windows Azure Tools.Azure_Logo

When trying to create tables in the local development storage, I got the error “Invalid image format”. This issue occurred both from VS (using the Create Test Storage Tables option) and when running DevTableGen.exe manually from a command prompt. It didn’t occur when doing the same in VS2008.

DevTableGen.exe is a tool from the Windows Azure SDK. This tools loads an assembly, reflects over it and then tries to create tables in the local development storage.

After some head scratching I figured out the cause: in Dev10 the default target platform for executables was changed from AnyCPU to x86. In Beta 1 a bug snuck in, so that x86 is also the default for class libraries (DLLs). This will be changed back to AnyCPU in Beta 2. This blog post from Rick Byers has a lot of detail on why the default has changed.

DevTableGen.exe is an AnyCPU executable, so it will run as a 64-bit process on an 64-bit version of Windows. As such it cannot load assemblies marked as 32-bit only when run on 64-bit Windows. The solution was to change the assembly to AnyCPU.

This issue would have been prevented if DevTableGen.exe was marked as 32-bit only. That way it would always run in a 32-bit process and could load x86 and AnyCPU assemblies. According to the blog post linked to above, it is now considered best practice to explicitly mark an executable as x86 or x64. For most applications x86 is the best option.

I’ve suggested this change to the product team.

Update: I've been informed that DevTableGen.exe will not be changed. This is because this issue is temporary and will go away when VS2010 Beta 2 is released. Also the web role and worker role processes in Windows Azure are 64-bit, so trying to load x86 assemblies will fail anyway. So if you use Beta 1 make sure you explicitly change the platform for any assemblies you create for the cloud to AnyCPU.

1 Comment

Ever since the internal unveiling of Windows Azure as project “Red Dog” at our internal TechReady conference in July 2008, I’ve been very interested in this Software+Services platform.

Technical strategist Steve Marx from the Windows Azure team recently released a cool sample app called The CIA Pickup. He put up a demonstration video and a nice architecture drawing of this app up on his blog.


Using the app you can pretend to be a CIA agent and hand out a phone number and your agent id to someone. When this person calls this number, they are greeted by an automated message that says they are connected to the CIA automated phone system and are requested to enter your agent id. After they have entered your id, you will receive their caller id via e-mail.

Seeing that 90% of the IT population seems to be male of which probably 95% is straight, I can see why the app is slightly biased in helping men picking up phone numbers of women. But if you don’t like this, you can always pick up the source and change the text. Which I did. Not to change the text, but to make some improvements so that I could run the app in my own Windows Azure playground in the cloud.

For example, the SMTP port of my e-mail service is not the standard port 25. I made this port configurable and in the process I found out that the app has to be deployed with full trust in order to be able to use the non standard port. I added logging to trouble shoot issues like this and made some security improvements.

I contributed these improvements back to Steve and he has gracefully credited me in his second blog post.

The CIA Pickup app is a great example of the power of combining different off-the-shelf services like SMTP providers, telephony service Twilio, Azure Table and Queue Storage, Windows Live ID Authentication with custom code, C# and ASP.NET MVC, running in the cloud. You can literally have this up-and-running within a couple of hours, including the creation of all necessary accounts.

So go try it out! You don’t need to deploy the app yourself to do this. You can use Steve’s deployment for this. Although it uses the US phone number +1 (866) 961-1673, it works when dialing from the Netherlands. If you want to get in touch, use my agent id 86674 😉

A couple of months ago I received a license for NDepend to evaluate its usefulness. I was already convinced that NDepend is a very useful tool. But up to now, I hadn’t put NDepend to good use in a way that I could blog about it.

Today I decided to bite the bullet and put my own pet project FlickrMetadataSynchr up for analysis. Its source code is available on CodePlex.

NDepend analyses managed code for several quality aspects, like cyclomatic complexity, coupling and unused code. In a way it resembles FxCop, but it also does a lot more in terms of reporting. NDepend also is a lot more flexible in letting you query your code base. For this it uses its own SQL variant called Code Query Language (CQL). For example, you could enter this query into the tool


and NDepend will show you all public methods whose number of lines of code exceeds 30.

Just by using the standard settings, NDepend gives you truckloads of information that point to areas with potential code smell. The report has inline comments that explain why it selects stuff and points out possible false positives for which it is okay to ignore the warning.

You can find my NDepend results here if you want to see what such a report looks like.

Starting with those results from top to bottom, I started refactoring my code to improve the quality. For example, splitting up methods to:

  • Reduce cyclomatic complexity
  • Reduce the number of IL instructions in a method
  • Reduce the number of local variables in a method
  • Increase the comment to code ratio

This should increase maintainability of the code.

Go check out this tool if you are interested in improving the quality of your .NET code or if you are tasked with reviewing somebody else’s code.

Sometimes it’s attention to detail that excites me the most. I just noticed the beautiful rendering of PNGs with transparency in the Pictures Library view in Explorer in Windows 7 (RC build):

PNG Transparency in Pictures Library View

You can get this view by selecting Arrange by Month in the upper right-hand corner of the Pictures library view. The RC build has been pretty stable for me and I use it for “production” purposes on my work laptop. I have both Visual Studio 2008 SP1 and Visual Studio 2010 Beta 1 installed on it and this works fine.

These images you see above do not reside on my Win7 laptop, but on my Windows Home Server (WHS) box. I’ve included the \serverphotos share in my Win7 Pictures Library. This pulls some 20,000 pictures into my library without any ill effect. I run Windows Search 4.0 on my WHS, so searching the library is still very snappy. This is possible because the search box in Explorer uses Remote Index Discovery and my laptop doesn’t have to index those pictures by itself.

You can code against the new Library feature in Win7 using C++ as explained on the Windows 7 Blog for Developers. If you are slightly less masochistic and want to use C# or VB, I suggest you use the Windows API Code Pack for Microsoft .NET Framework. It’s essentially a bunch of wrapper classes around new unmanaged code APIs in Windows that are not yet covered by the .NET Framework itself.

PS: If you are still on Windows Vista, SP2 has just been released on MSDN Subscriber Downloads.

PS2: I lied a bit. Those images you see on the left are actually beautiful 2048x2048 pixel TIFF files with transparency. You can download those so-called Blue Marble pictures.

I had read some blogs posts about the new smooth streaming capabilities for IIS 7.0, but I never actually experienced them myself. IIS Smooth Streaming is a technology that works with Silverlight in delivering a smooth video playback experience from Microsoft Internet Information Server in circumstances with varying network bandwidth.

It is really easy to try it out for yourself via http://www.iis.net/media/experiencesmoothstreaming

You get some controls to play with to artificially throttle the bandwidth available to Silverlight for downloading the video stream. If you throttle it down you can see how the stream smoothly switches to a lower bitrate version of the video without too much glitches in the playback experience. If you give Silverlight full bandwidth again, the bitrate gradually climbs up till you get real HD quality again (assuming your maximum bandwidth allows for that). A picture says more than a thousand words:

Experience Smooth Streaming  The Official Microsoft IIS Site

It also works with the Linux variant of Silverlight called Moonlight. Check out Miguel de Icaza’s blog for that.

Yesterday Microsoft published a ~ 100 TB image update to Live Search Maps. And finally, we have bird’s eye imagery for Amsterdam, The Netherlands. Since I live in Amsterdam, you can imagine that I am pretty thrilled about this.

This is the bird’s eye image of Dam Square in Amsterdam:

 Bird's Eye Imagery for Amsterdam in Live Search Maps

The platform that powers Live Search Maps is called Virtual Earth. It is a developer friendly platform that allows you to easily embed maps, aerial and satellite photography on your own web pages. The UI is customizable, so you are not stuck with what is provided by default. You can overlay icons, pictures and text on the map.

The Dutch version of Live Search Maps is an example of a site that is build on the Virtual Earth platform. It looks like the standard version, but it integrates with De Telefoongids en Gouden Gids data to locate people and businesses. If you live in the Netherlands this version is probably better suited for you than the international version.

Check out how easy it is to use the Virtual Earth platform by using the Interactive SDK on http://dev.live.com/virtualearth/. It is one of the Live Services that we provide. Check out the Virtual Earth Mashups Library to get an idea of what is possible with this platform.


One of the cool features of Live Search Maps is that it allows you to discover community content like geotagged Photosynths. For instance, by going to Leeuwarden and clicking “Verzamelingen” in the upper right corner, you can find my Photosynth of the train station in Leeuwarden:

Discover Photosynths on Live Search Maps

If you watched the first keynote of PDC08, either at PDC or through the live stream, you have seen the first public unveiling of Windows Azure. In short, it’s our OS for the cloud.


A CTP of the Windows Azure SDK should be available shortly. In the mean time, you can get busy with the “Oslo” SDK that has been released already. Downloadable from the new “Oslo” Developer Center on MSDN.

Of course as a Microsoft employee I am biased about this new, but oh so familiar, platform. So don’t take my opinion, but that of Robert W. Anderson. He writes about Windows Azure:

It is the openness of this platform, the ability of developers to mix and match the different components, and to do it between the cloud and in-premises solutions that makes this such a winner.

This last point is an important one.  Microsoft is in a unique position to help enterprise IT bridge to the cloud.  While I don’t think Amazon and Google will cede that market to Microsoft, their current offerings aren’t a natural fit.

Taking this all together — not forgetting Microsoft’s leading developer productivity story — it looks like a home run to me.

We have created a new logo for the Microsoft .NET brand.

It will be used widely starting next week at PDC08 in Los Angeles. Expect lots of great announcements at this event.

For those attending PDC08, have fun, I am sure you will be amazed! For the not so fortunate who stay at home, the keynote sessions will be streamed live. All other sessions will be available as webcasts within 24 hours.

Keep an eye on the PDC site next week.

Details on why we are reinvigorating the .NET brand with a new logo can be found here.

Since last week I have a new digital SLR camera: a 15 megapixel Canon EOS 50D. With it I took my first photo set with Photosynth in mind. I am very happy with the result: 98 photos that are 100% synthy (meaning that they all connect into one seamless 3D scene).

Here is a screenshot of this scene of the main hall of the train station in Leeuwarden:

Photosynth (Build 10683) - Train Station Leeuwarden

Of course, this synth is best experienced live because then it is fully navigable. You can move around using the mouse, cursor keys or keyboard shortcuts. Also try to zoom in. Fifteen megapixel pictures give you quite some leeway for zooming into details.

Have you created a nice synth? Leave the link as a comment so that I can check it out.

1 Comment

For the last week, I have been in love with Photosynth. It was a tech preview in view-only mode for quite a while, but now we finally released it to the masses.

I've created three synths from existing pictures, i.e., from pictures I took without having Photosynth in mind. These are my first experiments:

  Photosynth (Build 10683) - Sunset Amsterdam

But these ones are much better:

Photosynth is a prime example of the execution on our Software + Services vision. It combines the best of the web with local computing power (on Windows).

Go create!

PS: I have a 40 Megapixel picture of Mount Rainier stitched from the same pictures as above. For the stitching I used Windows Live Photo Gallery. You can view it using Silverlight DeepZoom technology.