OData client libraries for .NET 4, Silverlight 4 and Windows Phone 7


ODataNetFx4_SL4_WinPhone7_Client.zip – contains a Visual Studio 2010 solution with the source code for the OData .NET 4, Silverlight 4 and Windows Phone 7 Client library. To use, unzip the file locally and open the solution in Visual Studio 2010.
ODataClient_BinariesAndCodeGenToolForWinPhone.zip – contains just the OData client assemblies and code generation tools for use on Windows Phone 7.
ODataClient_WinPhone7SampleApp.zip – contains a sample Windows Phone 7 application which uses the OData client library for Windows Phone 7

Parallel Framework in Action



The #1 reason, IMHO, to look at .NET 4 is the parallelism. I say this not as a Microsoft Shill, but rather as a dude who owns a 6-core (12 with hyper-threading) processor. My most favorite app in the Training Kit is ContosoAutomotive. It’s a little WPF app that loads a few hundred thousand cars into a grid. There’s an interface, ICarQuery, that a bunch of plugins implement, and the app foreach’s over the CarQueries.

This snippet here uses the new System.Threading.Task stuff and makes a background task. That’s all one line there, from StartNew() all the way to the bottom. It says, "do this chunk in the background." and it’s a wonderfully natural and fluent interface. It also keeps your UI thread painting so your app doesn’t freeze up with that "curtain of not responding" that one sees all the time.

This code says "go do this in a background thread, and while you’re there, parallelize this as you like." This loop is "embarrassingly parallel." It’s a big for loop over 2 million cars in memory.


For more goto Scott Hanselman – The Weekly Source Code 56 – Visual Studio 2010 and .NET Framework 4 Training Kit – Code Contracts, Parallel Framework and COM Interop

Asynchronous Cancellation Patterns with .NET 4


For calling methods asynchronously, since .NET 1.0 the async pattern can be used. .NET 2.0 added the event-based async pattern (also known as async component pattern) that makes async calls easier with Windows applications. Before .NET 4 no standard mechanism has been available to cancel asynchronous method calls. That’s new with .NET 4.0.

In this blog series you can read about these async patterns as well as the new unified model for cancellation.

Part 1 of this series introduced the async patterns and introduced cancellation with the BackgroundWorker class as it existed since .NET 2. In part 2 of this series Christian will show how the new .NET 4 cancellation framework can be used.

Previously to .NET 4, cancellation with async method calls was implemented in different ways if it was supported at all. For example, the BackgroundWorker implements cooperative cancellation by invoking the CancelAsync method, the long-running method needs to verify if it should be canceled by checking the CancellationPending property and needs to cancel by setting the Cancel property of the DoWorkEventArgs. More about this in the previous blog entry.

.NET 4 now supports cooperative cancellation of async methods in a standard way. The heart of this new framework is the CancellationToken struct. The CancellationToken is created by a CancellationTokenSource. This token can then be passed to any activity that should be cancelled. In case of a cancellation, the async call can verify cancellation by checking the IsCancellationRequested property of the CancellationToken. This unified model is now available with several classes offering asynchronous requests.

Patterns for Parallel Programming with the .NET Framework


This document provides a detailed and in-depth tour of support in the Microsoft® .NET Framework 4 for parallel programming. This includes an examination of common parallel patterns and how they’re implemented without and with this new support in the .NET Framework, as well as covering best practices for developing parallel components utilizing parallel patterns.

This document was written by Stephen Toub from the Parallel Computing Platform team at Microsoft. It is based on the .NET Framework 4 and Visual Studio 2010. Two versions of the document are available, one with code samples in C# and one with code samples in Visual Basic.

Via Download details: Patterns for Parallel Programming with the .NET Framework

Running IronPython Scripts from a C# 4.0 Program


Running IronPython Scripts from a C# 4.0 Program

Before you read this you may want to check out my other post.

IronPython is a scripting language hosted on the .NET platform. This posts shows how you can use the Dynamic Language Runtime (DLR) and the new C# 4.0 dynamic keyword to call an IronPython script from a C# program.



import sys

def Simple():
    print "Hello from Python"
    print "Call Dir(): "
    print dir()
    print "Print the Path: " 
    print sys.path


using System;
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;

public class dynamic_demo
    static void Main()
        var ipy = Python.CreateRuntime();
        dynamic test = ipy.UseFile("Test.py");


Via Charlie Calvert’s Community Blog : Running IronPython Scripts from a C# 4.0 Program

All you need to know about Visual Studio 2010 Beta 2


Visual Studio 2010 Beta 2 Download – Home


What’s new in .NET Framework 4

.NET Framework 4 Beta 2 Documentation



Training Kit – Oct. Preview


Training Course – includes videos and hands-on-labs designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies


Samples – C#, F#, Parallel Processing, Office, SharePoint


Visual Studio 2010 Beta 2 and Silverlight updates – Tim Heuer



Silverlight Toolkit Oct. 2009 Release – support Visual Studio 2010 design time experience, Extensible Charting, Drag & Drop support for controls


Visual Studio 2010 Beta 2 from an ASP.NET MVC Perspective – Phil Haack


AJAX Control Toolkit

Download Deep Zoom Composer

Download ASP.NET Ajax Control Toolkit

Microsoft Ajax Library and Visual Studio 2010 Beta 2 – Stephen Walther


Visual Studio 2010 and .NET Series by ScottGu


IronPython – http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28125

  1. Install IronPython 2.6 CTP for .NET 4.0 Beta 2.msi from -http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28125
  2. Follow any of the many dynamic walkthroughs online -http://blogs.msdn.com/vbteam/archive/2008/12/17/walkthrough-dynamic-programming-in-visual-basic-10-0-and-c-4-0-lisa-feigenbaum.aspx




No Javascript Intellisense – http://west-wind.com/weblog/posts/50857.aspx

In case you need to uninstall Visual Studio:

  • Try to uninstall using the ISO image.
  • Or you can try this if you don’t have the ISO.1. Uninstall TFS Object Model (This step is Visual Studio 2010 Team Suite only)
    From Add/Remove, uninstall Microsoft Team Foundation Server 2010 Beta 1 Object Model
    2. Uninstall all instances of Visual Studio 2010 products (for example, Visual Studio 2010 Ultimate).
    3.1 If you have previous versions of Visual Studio
    Uninstall other remaining supporting products, in the specified order. (Ignore items that are not present on your computer.)
    a.    Visual Studio 2010 Tools for Office Runtime Beta 2
    b.    The .NET Framework version 4 Language Pack
    c.    The .NET Framework version 4 Extended (reboot, if prompted)
    d.    The .NET Framework version 4 Client (reboot, if prompted)

    3.2 If no previous versions of Visual Studio
    3.2.1 Optionally, uninstall the following supporting products that may have been installed with Visual Studio 2010.  NOTE: These components may also be used by other product suites on your computer.
    a.    Web Deployment Tool
    b.    Silverlight 3 SDK
    c.    SQL Server 2008 Management Objects
    d.    SQL Server CLR Types
    e.    SQL Server 2008
    f.    SQL Server 2008 Native Client
    g.    SQL Server Compact 3.5 SP2

    3.2.2 Uninstall other remaining supporting products, in the specified order.  (Ignore items that are not present on your computer.)
    a.    Visual Studio 2010 Tools for Office Runtime Beta2
    b.    The .NET Framework version 4 Language Pack
    c.    The .NET Framework version 4 Extended (reboot, if prompted)
    d.    The .NET Framework version 4 Client (reboot, if prompted)
    4. Reboot
    5. Uninstall C++ 2010 Redistributable
    From Add/Remove, uninstall Microsoft Visual C++ 2010 Beta 2 Redistributable (x86 and/or x64)
    6. Reboot