If you are interested in the history of LINQ to SQL and how it works internally, go watch Charlie Calvert's video with Matt Warren and Luca Bolognese.

The first 30 minutes of this video are primarily about the internals. The last 10 minutes focus on the history of LINQ to SQL and how it relates to its "predecessors" Cω  and ObjectSpaces. Matt and Luca also tell how Erik Meijer and Anders Hejlsberg got involved.

Related posts on this blog:

WPF comes with great support for animation using XAML without needing to code this in for example C#. With Silverlight (fka "WPF/E") you can also do animations from XAML.

If you want to perform custom animations in code that you can't do using XAML, you need timers. In the full blown WPF you have several options, e.g., System.Threading.Timer, System.Timers.Timer and System.Windows.Forms.Timer.

You normally provide a callback that gets called when the timer elapses from a background thread. Properties on WPF objects can only be set from the foreground thread, so you have to queue a call on the UI thread to perform the actual animation. You can do that by calling the Invoke or BeginInvoke method on the System.Windows.Threading.Dispatcher class. You can access the correct Dispatcher instance to use through the Dispatcher property on the UI element (*).

Another option in WPF is to use the Rendering event of a CompositionTarget instance. In that case you get called when WPF is ready to render a frame. The frame rate depends on CPU speed, GPU performance, graphics complexity and other factors, so it fluctuates. This means that the interval after which you get called also fluctuates. However this is great for some scenarios.

In the current Silverlight 1.1 alpha your options are more limited. The CoreCLR libraries do have a System.Threading.Timer, but there is no Dispatcher class to delegate work to the UI thread. So it is useless for doing custom animation. In the source of the Monotone sample by Lutz Roeder I found there is an HtmlTimer class in Silverlight 1.1. This class is undocumented and marked obsolete. Visual Studio shows a warning after compilation:

'System.Windows.Browser.HtmlTimer' is obsolete: 'This is not a high resolution timer and is not suitable for short-interval animations. A new timer type will be available in a future release.

Lutz shows how to use an HtmlTimer in his sample. HtmlTimer has a Tick event. Any event handler that you wire-up to that event gets called from the UI thread. So that solves the problem for the time being.

When I tried to Google for more info on HtmlTimer, all I found was this blog post by Mike Taulty which mentions this class in passing.

(*) In fact any .NET class that derives from DispatcherObject has a Dispatcher property.

1 Comment

If you haven't heard the news yet, you must be living under a rock 😉 There is a new CLR in town. Silverlight (fka "WPF/E") 1.1 comes with its own CLR. And the best news is that it runs both on the Mac and the PC.

Go check it out at silverlight.net.

One of the greatest achievements is that the download is a mere 4 MB. If you have a reasonably fast Internet connection you can download and install it in under a minute. Try that with .NET 3.0! That will take at least an order of magnitude longer to install.

Before the announcment at MIX07, I wasn't sure if Microsoft would be able to pull this off. They have certainly gone beyond my expectations.

This is what the Silverlight directory looks like after the install:


It shows you this CLR is completely separate from the standard CLR 2.0 runtime and has no dependency on it. This CLR has 2.1.x.x as version number. It has no Global Assembly Cache (GAC). You can see that support for dynamic languages like Python and JScript is included. Support for Ruby is in the works.

Go listen to the Channel 9 interview with Scott Guthrie if you want to know how Microsoft succeeded in trimming down the CLR 2.0 and the Base Class Libraries to this size.

The Silverlight .NET assemblies have the same format as standard .NET assemblies, so you can view them using Reflector. The type system is the same, so Silverlight supports generics. It will also support C# 3.0, VB 9.0 and LINQ.

These are exciting times for the .NET world. The reach of .NET has been substantially increased. Not just because the few percent of Mac users can run .NET applications now, but because it is such an easy deployment for Firefox users on the PC. And soon for Opera users as well.

Microsoft has some great news today: the new Expression Web (already RTM) and Expression Blend (RTM later in Q2 2007) tools will be included in the MSDN Premium Subscription. Soma announced this on his blog. This is the result from strong feedback from the developer community.

Although I am not a graphical designer, I have to come to appreciate both tools.

Expression Blend goes beyond what you can accomplish with "Cider". "Cider" is the codename for the WPF design surface that will be included in Visual Studio "Orcas". I used Blend to design the UI for my Flickr Metadata Synchr. And we have used it at LogicaCMG for a WPF showcase application.

Expression Web has a much richer HTML/CSS editor than the one in Visual Studio 2005. VS "Orcas" will come with a new HTML/CSS editor based on the same codebase. This will lessen the need for a separate tool for web developers, but "Orcas" will not RTM before the end of this year. I am still working on getting a more graphically inclined colleague to give up on Dreamweaver and switch to Expression Web 😉

Earlier this month on Channel 9, Scott Guthrie alluded to some great new functionality coming for web development in Visual Studio "Orcas".

Today, the details are revealed on ScottGu's blog and on Mikhail Arkhipov's blog. Mikhail blogs about the new web forms designer in "Orcas", codenamed "Sapphire". Check out the screenshots of the much improved CSS support, side-by-side view of Code and Design and new HTML designer options.

"Sapphire" has been work-in-progress since November 2004. Since the code is now integrated in the "Orcas" main code branch, this new web forms designer will become available in the upcoming February 2007 CTP.

1 Comment

Earlier on Friday I played around with January 2007 CTP of Visual Studio "Orcas". Lots of things are still missing from this CTP. But more is coming soon.

Scott Guthrie reveals that lots of new web development stuff will be included in the next CTP which is scheduled for February 2007. He tells us that the new HTML/CSS designer from Expression Web will be included in Visual Studio "Orcas" as well. That's great news.

Scott tells this on Channel 9 where he is being interviewed by my favorite Channel 9 guy Rory. Scott is the best example I know of the friendly, open and approachable parts of the company that are growing inside Microsoft. It is great to hear him argue against the obfuscation of the XAML used by WPF/E. Scott is a guy who just gets it. He understands that better standards support by Microsoft for things like CSS is important. May lots of others Microsoftees follow his lead. Other topics in the interview: WPF, WPF/E, ASP.NET AJAX, LINQ, IIS 7.0, Scott's responsibilities in Microsoft as a General Manager and some personal anecdotes. Go see this great interview. It's worth 42 minutes of your life 😉

PS: If you live in or near the Central European Timezone, you might notice that I am posting this quite late on a Friday night/Saturday morning. I am already trying to adjust to Pacific Standard Time 😉 In two days a whole bunch of colleagues from the Netherlands will be flying to Seattle for the US part of the Microsoft LEAP program we are participating in. I leave on Sunday and will be back next Saturday.

1 Comment

Or is it the Visual Studio "Orcas" December 2006 CTP? The product itself is confused. The about dialog shows both monikers.


You can download this CTP here.

It has been awhile since the October 2006 CTP of "Orcas" that I wrote about previously. Here are my first observations about this CTP.

Integration problems for .NET 3.0?

I believe this CTP shows that Microsoft is experiencing major integration problems among its technologies. Would you believe that this CTP does not contain the RTM version of .NET 3.0?! Instead it containsan older version version with build numbers off by more than 100. Think back to when .NET Framework 3.0 was released to manufacturing: November 6, 2007. Imagine how many days it has been in escrow before that. Yet it hasn't been integrated into the Visual Studio builds...

Build numbers.NET 3.0 RTM“Orcas” Jan 07 CTP
WCF and CardSpace3.0.4506.303.0.4324.17

Like older "Orcas" CTPs, this CTP lacks any developer support for .NET 3.0. So no documentation, project templates and visual designers. For .NET 3.0 development, you need to use Visual Studio 2005 with the "Orcas" CTP extensions. The latest version of those extensions is the November 2006 CTP. Microsoft announced that that would be the last release for Visual Studio 2005. Going forward, they should be integrated in Visual Studio "Orcas". Apparently, that hasn't happened yet.

So what is missing?

  • Up-to-date .NET 3.0 version
  • Developer support for .NET 3.0
  • Team Foundation Server "Orcas"

Exciting content

However, an older .NET 3.0 version and missing technology does not mean that this "Orcas" CTP does not contain exciting content. It contains the most expansive .NET 3.5 released yet. It's version number is 3.5.11209. The list of features can be found in the middle of the download page. For your convenience, here is a copy of that list:

  • Extended, more powerful data APIs with the ADO.NET Entity Framework and LINQ to ADO.NET
    • With the ADO.NET Entity Framework developers will be able to model the view of the data that is appropriate for each one of the applications they are building, independently of the structure of the data in the underlying database. The use of the Entity Data Model (EDM) enables developers to design models that follow the concepts built into the application, instead of having to map them to constructs available in relational stores. Once the model is in place, the powerful ADO.NET Entity Framework API is used to access and manipulate the data as .NET classes or as rows and columns, whatever is appropriate for each application.
    • ADO.NET is fully integrated with LINQ and offers many options for using LINQ in various scenarios: LINQ to SQL provides direct access to database tables from the programming environment, LINQ to Entities enables developers to use LINQ over EDM models, and LINQ to DataSet allows the full expressivity of LINQ to be used over DataSets.
  • C# 3.0 Language Support: This CTP implements all of the C#3.0 language features from the May LINQ CTP including:
    • Query Expressions
    • Object and Collection Initializers
    • Extension Methods
    • Local Variable Type Inference and Anonymous Types
    • Lambdas bound to Delegates and Expression trees
  • VB 9.0 Language Support: This CTP implements all of the VB 9.0 language features from the May LINQ CTP including:
    • Query Expressions
    • Object Initializers
    • Extension Methods
    • Local Variable Type Inference
    • Anonymous Types
  • LINQ to Objects API
    • The LINQ to Objects API supports queries over any .NET collection, such as arrays and Generic Lists. This API is defined in the System.Linq namespaces inside System.Core.dll. Click here for more details about LINQ.
  • ClickOnce improvements
    • This CTP delivers ClickOnce improvements for the deployment of Windows Presentation Foundation applications, alternative browser support and ISV rebranding.
  • Managed classes for Elliptic Curve Diffie Hellman and Elliptic Curve Digital Signature Algorithm cryptographic functionality
    • With the addition of these classes, cryptographic developers now have managed classes for Elliptic Curve Diffie Hellman secret agreement and Elliptic Curve Digital Signature Algorithm signing. These classes are built on the new CNG cryptographic libraries in Windows Vista, but still follow the familiar patterns of the cryptographic classes in .NET Framework 2.0.
  • Runtime and design-time support for Office 2007 (including Outlook 2007)
    • Customers can build managed code add-ins with a consistent development experience, regardless of which version of Office they target, which Office application(s) they target, and which programming language they choose. Managed code add-ins enable developers to use strongly-typed class members, with the help of modern development tools, including intellisense and auto-complete. Additionally add-ins can potentially run in multiple versions of Office, enabled by abstracting version-specific code and supported by a version-resilient infrastructure.
  • Support for advanced lifetime management of add-ins and their AppDomains
    • We’ve added the helper classes that manage the lifetime of add-ins, the objects passed between the host and add-ins, and even of the AppDomains the add-ins live in. By using the ContractBase and LifetimeToken handle, pipeline developer can let the hosts and add-ins act as if everything, including the AppDomain the add-in was activated in, was controlled by the garbage collector even though .Net Remoting would normally make that impossible.
  • Client service support for Login/Logout, Role management and Profiles
    • ASP.NET 2.0 shipped with new application services for authentication, authorization and personalization. Most of these services are not tied to ASP.NET and can work in non-web applications. This CTP enables the use of these services in smart client applications for Logon/Logoff, Role management and profiles.
  • A trace listener that logs event to ETW, event tracing for Windows in Vista
    • Event tracing for windows is greatly improved in Vista and the most performant loggings facility available in Windows. The System.Diagnostics.EventProviderTraceListener allows managed tracing to provide events to the Vista’s ETW infrastructure. This is a highly performant, thread-safe listener.
  • Jscript Intellisense support
    • Jscript code formatting and Intellisense support provide developers with a richer editing experience. These improvements enable the IDE to provide statement completion, color syntax highlighting and in-place documentation to Jscript and associated script models such as ASP.NET AJAX.
  • A new numeric type that provides support for very large numbers (Beyond the range of In64)
    • All existing numeric types in the Framework have a limited range. This is the first type that supports arbitrary range and will extend to accommodate any large number as needed. This type lives in the new System.Numeric namespace where all new numeric and arithmetic features are going to reside. It supports all the basic arithmetic operations including things like Pow, DivRem and GreatestCommonDivisor. It implements the following interfaces: IFormattable, IComparable, IComparable<BigInteger> and IEquatable<BigInteger>. It is serliazable and immutable. It has implicit casts from all basic integral types and explicit casts to/from all numeric type. To learn more about this type – please visit the BCL team blog.
  • LINQ over XML (XLinq)
    • Enable further LINQ over XML feature support (in addition to the functionality available in the Oct 2006 CTP) such as the ability to apply XLST to transform into and out of XLinq trees, support for System.XML reader/writer interfaces for improved XML sharing with DOM applications and System.XML schema validation for XLinq nodes.
  • SQL Server Compact Edition (SSCE)
    • SQL Server Compact Edition (SSCE) provides a local relational data store for occasionally connected client applications from desktops to devices. SSCE is light weight, embeddable and is easy to deploy with your client applications without requiring complex administration work from users. Timestamp (row version id) data type, improved table designer, Query processor enhancements and support for local transaction scope are some of the new features you find in this version of SSCE.

1 Comment

Microsoft has released the October 2006 CTP of Visual Studio Codename "Orcas". If you have the available bandwith go download it here.

It is a bit larger than the September 2006 CTP. This time it is a 4.05 GB self-extracting EXE split over 6 parts for the Orcas differencing disk. This works on top of the 2.72 GB VHD file for the base image. After turning off undo disks, booting the VPC for the first time, installing the Virtual Machine Additions and starting Visual Studio, the VHD of the differencing disk was 10.0 GB.

The version numbering mayhem that I blogged about previously, still continues with this CTP.

The build number of the 3.5 part of the framework has changed to 61010:

The .NET 3.0 build that is included is still the same old version 4310 as in the September CTP.

This is the content of the Microsoft.NETFrameworkv3.5.61010 folder:

New with respect to the September CTP are System.Data.Entity.dll and System.Xml.XLinq.dll. There are still no .NET 3.0 or .NET 3.5 (LINQ) related project templates available in Visual Studio. You will have to do everything manually. There is no Windows SDK included in the image so don't go look for any help on developing for .NET 3.0 or .NET 3.5 there.

There is more new .NET 3.5 framework stuff in System.Core.dll when compared with the September CTP. These are the main namespaces in the October CTP:

To create a very simple LINQ program I had to manually add a reference to the System.Core.dll assembly. The .NET 3.5 Framework folder contains version 8.00.61010 of the C# compiler. When building the program VS "Orcas" seems to be using a .NET 2.0 version of the C# compiler, version 8.00.50727.192, yet it understands the var keyword that is being introduced in C# 3.0.

The output window in VS says:

C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:WINDOWSMicrosoft.NETFrameworkv3.5.61010System.Core.dll /reference:C:WINDOWSMicrosoft.NETFrameworkv2.0.50727System.Data.dll /reference:C:WINDOWSMicrosoft.NETFrameworkv2.0.50727System.dll /reference:C:WINDOWSMicrosoft.NETFrameworkv2.0.50727System.Xml.dll /debug+ /debug:full /filealign:512 /optimize- /out:objDebugConsoleApplication1.exe /target:exe Program.cs PropertiesAssemblyInfo.cs

Maybe I am still confused as to the red vs green bit changes in .NET 3.5. It would seem this is a red bit change, while I thought it would be a green bit change. The "normal" .NET 2.0 C# compiler has the version number 8.00.50727.42. If someone understands how this works, please let me know.

BTW: The C# 3.0 (3.5?!) compiler executable is gigantic when compared to the 2.0 version: 1.13 MB vs 69 kB. The stuff that was previously implemented in cscomp.dll seems to have moved into the executable itself.

All in all, I think this CTP still doesn't qualify as being really useful.

1 Comment

Today I started using the September 2006 CTP of Visual Studio Codename "Orcas".

Microsoft has started to distribute the "Orcas" CTPs as Virtual PC images which are based on a common Windows Server 2003 base image. The downloads are pretty large: 1.13 GB for the self-extracting EXE of the base image and 3.6 GB for the self-extracting EXE for the Orcas differencing disk. After extraction the numbers are 2.72 GB for the base image VHD and 9.27 GB for the Orcas VHD.

I extracted these files at home to a portable LaCie Ethernet Disk Mini hard-disk and transported them to work. My portable hard-disk is formatted as an EXT2 partition. The LaCie drive supports the NTFS format only as readonly when it is connected through Ethernet instead of through USB. I still want to able to use the drive as network-attached storage, so NTFS is not suitable for my drive. The drive does fully support FAT32, but FAT32 cannot store files bigger than 4GB. So FAT32 is not suitable either.

Windows XP does not natively support external drives formatted as EXT2 because it is a Linux format. Thankfully this can be fixed by the free-ware Ext2 Installable File System For Windows (Ext2fs).

Virtual PC 2004 SP1 doesn't seem to like accessing large files on an external EXT2 partition. I got some weird errors in the past when I tried booting a Virtual PC stored in that way. However, Virtual Server 2005 R2 (also available for free) works fine so I am using that instead.

If you look at the about box of Visual Studio Codename "Orcas" you can notice some things having the potential of causing incredible version confusion:

The "Orcas" Virtual PC has the following .NET Framework versions installed: 1.1, 2.0, 3.0 and 3.5.

Notice the inconsistency in the version numbering scheme. Why is it "v3.0" and "v3.5.60905"?! Previous feedback about naming inconsistencies hasn't had much effect. Also note:

Why is it Windows Workflow Foundation and just the acronym WPF?!

There is no support for .NET 3.0 in this "Orcas" CTP: there are no templates and designers for .NET 3.0 components like WPF, WCF and WF. Even though Microsoft has released these as the Microsoft Visual Studio Code Name “Orcas” Community Technology Preview – Development Tools for .NET Framework 3.0 ("Fidalgo").

The "Orcas" image is very large, but there is no Windows SDK installed. I think you are out of luck if you would try installing the Windows SDK for .NET 3.0 development and "Fidalgo": the build number for the RC1 of the .NET Framework 3.0 is 4324. This "Orcas" CTP contains the older build 4310.

"Orcas" is meant to target .NET 3.5, yet the about box says it is for .NET 2.0. "Orcas" still has the same major and minor version number 8.0 as Visual Studio 2005. It has the new C# 3.0 and VB 9.0 compilers and IntelliSense, but the installed products are still listed as Visual C# 2005 and Visual Basic 2005.

A version of LINQ is included in the System.Core DLL in the GAC. The file version number is 2.0.60905.0 and the assembly version number is This makes it seem as though LINQ is part of .NET 2.0 instead of .NET 3.5. Fortunately it is placed in the Microsoft.NETFrameworkv3.5.60905 folder. Here is the content of that folder:

I couldn't find an other way to add a reference to the System.Core assembly to a Visual Studio project other than by manually adding a reference this DLL by browsing to this directory. These are the main namespaces in the System.Core assembly:

.NET 3.5 as released in this "Orcas" CTP is far from complete. Things that have been released as CTPs like LINQ designers, LINQ to XML, LINQ to SQL, ASP.NET AJAX (fka "Atlas"), BLINQ and ADO.NET "vNext" will eventually be integrated into the .NET Framework and Visual Studio, but they are nowhere to be found in this CTP.

Which begs the question: Microsoft, what's the point of releasing this "Orcas" CTP when there are so many things missing?