.NET Framework 4.5 support in .NET Reflector

Given that .NET 4.5 is available as part of the beta for Dev11, we have added some new support functionality to .NET Reflector (this is already available in our EAP releases).

First, Reflector will now notice if you have .NET 4.5 installed on the machine. As 4.5 is an in-place installation, we notice the presence of certain files to trigger this.

This then populates the assembly list with a set of useful assemblies.

Click for the full screenshot

.NET 4.5 has led to a lot of rearrangement of the assemblies – there are a lot more assemblies, and using the type forward attributes you can see what has moved. For example, in System.Core, various types (such as LockRecursionException) have been moved elsewhere.

Click for the full screenshot

Using Reflector, we can see that LockRecursionException has a TypeForwardedAttribute, and by clicking on the type you can find where it has moved to. In this case, it has moved to mscorlib.

Click for the full screenshot

The other interesting feature added to the language is the CallerMemberName, CallerFilePath and CallerLineNumber attributes that can be added to optional arguments to get information about the caller of a given function. This is implemented, like optional arguments themselves, by baking extra information into the call site.

Click for the full screenshot

Using Reflector, we can decompile this to see the inlined arguments at the call sites.

We have some partial support for the new C# async/await construct, but we don’t yet have Reflector decompiling that perfectly. However, Reflector is proving to be a useful tool for investigating the new assemblies that make up the latest release of the .NET framework.

Click for the full screenshot

If you’re using the Early Access release of .NET Reflector to decompile C#5 async constructs, it would be great to know what kind of results you’re getting.

One thought on “.NET Framework 4.5 support in .NET Reflector

  1. Pingback: In the place through which we wander | Windows Live space

Leave a Reply

Your email address will not be published. Required fields are marked *