StyleCop 4.3 Is Out

The StyleCop team announced the release of a version 4.3 of the StyleCop tool. You can get it from here.

On this version there are some bug fixes, new rules and documentation.

Also in this version, the list of errors and warnings goes to the Errors List window like with the compilers. I whish that the errors and warnings would also be sent to the Output window.

SDK documentation on how to author custom rules and integrate the tool with custom build environments is expected soon.

Lutz Roeder’s .NET Reflector Is Now Red Gate’s .NET Reflector

Let’s face it, if you don’t know .NET Reflector, you can never claim to be a .NET developer.

Today Red Gate announced the acquisition of Lutz Roeder’s .NET Reflector.

On .NET Reflector’s page, Red Gate states that “will continue to maintain a free version for the benefit of the community”.

You can read an interview with Lutz Roeder and James Moore (general manager of .NET Developer Tools at Red Gate) at simple-talk.

James doesn’t know yet how to improve Reflector, but I do. Reflector needs a major improvement on UI usability and performance. Let’s see if I can come up with a list:

  • For me, search as you type is not a good idea as it is in Reflector.
  • Still in the search theme, search as you type would be nice for the active code window.
  • I cannot understand why changing any of the options fires a total repaint and lost of the view of the active code item.
  • Settings like code, documentation and number formatting should possible to change on the fly with a simple toolbar click.

I’m sure Red Gate is more than capable of taking good care of .NET Reflector.

Typemock Racer Alpha Is Out

Typemock has released an alpha version of its newest product: Typemock Racer.

Typemock Racer is the tool that uses dynamic and static analysis to find deadlocks in .NET code that had been previously announced by Roy Osherove.

Typemock Isolator 5.0 Is Out With Its New AAA API

Typemock has released version 5.0 of its unit testing tool: Isolator. Check out the release notes.

This new version comes with a new API: Arrange Act Assert:

I’ll have to say that I liked Isolator better over Isolate.

Also new in this version is the inclusion of the help file in the installation package.

.NET 3.5 SP1, VS2008 SP1 And TFS2008 SP1 Released

Microsoft .NET Framework 3.5 Service Pack 1

Microsoft Visual Studio 2008 Service Pack 1 (iso)

Visual Studio 2008 Team Foundation Server Service Pack 1

More On Another Way For Using The “using” Keyword

In the past I presented another possible use for the using keyword: as hints on LINQ.

I’ve been giving some thought about this lately and refined my proposal.

var q = from person in personCollection using MyEnumerableExtensions
        group person by person.LastName into g using new MyOtherComparer()
        orderby g.Key using new MyComparer()
        select person;

The above query would be converted to:

var q = MyEnumerableExtensions.OrderBy<string, Person>(
    MyEnumerableExtensions.GroupBy<string, Person>(
        person => person.LastName,
        new MyComparer(),
    g => g.Key,
    mew MyOtherComparer()

What do you think of this?

How About Property Assignment And Collection Adding Like Object And Collection Initializers In C#?

C# 3.0 introduced object and collection initializers. It is now easier to initialize objects or collections:

var person = new Person { FirstName = "Paulo", LastName = "Morgado" };

var persons = new List<Person> {
    new Person { FirstName = "Paulo", LastName = "Morgado" },
    new Person { FirstName = "Luís", LastName = "Abreu" }

var personDirectory = new Dictionary<string, Person> {
    { "Lisboa", new Person { FirstName = "Paulo", LastName = "Morgado" } },
    { "Funchal", new Person { FirstName = "Luís", LastName = "Abreu" } }

Wouldn't be nice to be able to do the same on already created objects and collections?

But, what would the syntax used be? Something like this?

var person = new Person();
person = { FirstName = "Paulo", LastName = "Morgado" };

var persons = new List<Person>();
persons += {
    new Person { FirstName = "Paulo", LastName = "Morgado" },
    new Person { FirstName = "Luís", LastName = "Abreu" }

var personDirectory = new Dictionary<string, Person>();
personDirectory += {
    { "Lisboa", new Person { FirstName = "Paulo", LastName = "Morgado" } },
    { "Funchal", new Person { FirstName = "Luís", LastName = "Abreu" } }

What do you think of this?

Visual Studio 2008 Service Pack 1 Expected Next Week

According to the MSDN Subscriptions home page, we should expect Visual Studio 2008 Service Pack 1 availability after August 11, 2008.

Microsoft Releases SQL Server 2008

SQL Server 2008 is finally out and comes with the Entity Framework, which means that SP1 for Visual Studio 2008 and the .NET Framework is almost out.

Serialized In-Process ASP.NET Session State Store


ASP.NET provides out of the box three session state stores:

Provider Description

Session state is stored in the ASP.NET cache.


Session state is stored out-of-process in an SQL Server database.


Session state is stored out-of-process in an ASP.NET state service.

Because with SQLServer and StateServer providers the state must cross the AppDomain boundary it needs to be serialized when stored and deserialized when loaded. Because the state needs to be loaded and stored on each request, it is only available from the PostAcquireRequestState to the ReleaseRequestState events. And, because of serialization and deserialization, all objects stored must be serializable any reference held to one of the session state items won’t be to the same item after being deserialized.

On the other hand, with the InProc provider, the state will never be serialized or deserialized, which means that objects don’t need to be serializable and any reference to an item in the state is always a reference to the item in the state even before the PostAcquireRequestState event and after the ReleaseRequestState event.

In practice, developers use the InProc provider and applications are deployed to production using the SQLServer provider. This usually leads to application errors, like storing non serializable objects in the state, that are only uncovered in production. That’s why I’ve written a serializable in-process session state store. You can find the sources here.