Archive

We just published the fifth maintenance release of PostSharp 2.0, correcting 29 bugs, mostly minor. The most significant improvement of this update is a solution to the number-one problem of PostSharp 2.0: its failure to load dependencies to C++ assemblies. The reason of the problem is that the CLR cannot load C++ assemblies when it is “hosted” (PostSharp hosts the CLR as SQL Server does). The solution proposed in this release is to load such assemblies for metadata only, i.e. do not load it with the CLR. This should be enough most of the time.

Even if you had no problem with previous versions of PostSharp, you may want to update to this version because it addresses an important run-time performance defect with OnExceptionAspect: the binding code was erroneously generated out of the catch block, so it was executed even when the aspect was not invoked. This issue is now solved.

This release is therefore a recommended upgrade for anyone.

Here’s the complete list of fixed issues:

  • Add possibility to specify the location of ILASM
  • Added support for Aspect.AspectPriority in Silverlight
  • AnnotationValue.FromObjectConstruction does not respect module translation
  • AnnovationValue.ToObjectConstruction does handle constructor arguments properly
  • Aspect MethodImplementationAspect missing from Silverlight build
  • Aspects inherited across assemblies are not visible in the Visual Studio Extension
  • AspectTypeDependencyAttribute does not work on Silverlight
  • Assemblies loaded by the native host may be given insufficient permissions
  • Assembly-level MulticastAttribute does not respect AttributeTargets=Struct/Delegate/Enum/...
  • AssemblyLoadException when loading mixed-mode assemblies, even when not required by PostSharp
  • Comparing method signatures ignores the method arity
  • Exception thrown on invalid lexical scopes
  • Expose the method Platform.LoadAssemblyFromFile to PostSharp.dll
  • Extension for VS2010 installed in wrong directory if VS is installed in non-default location
  • Generic parameter constraints are not loaded properly when lazy loading is enabled
  • Incorrect behavior when an IAspectProvider provides an invalid ObjectConstruction
  • Invalid code generation when IInstanceScopedAspect has explicit (private) implementation
  • IValidableAnnotation not executed if no aspect is included in the project
  • MulticastAttribute: symbols < and > in regular expressions are incorrectly escaped
  • NullReferenceException when introducing a method with custom attributes on parameters
  • OnExceptionAspect generates suboptimal code
  • PostSharp 2.0 is not side-by-side compatible with PostSharp 2.1 when a project references both versions
  • PostSharp emits PE32+ headers instead of PE32.
  • PostSharp.Aspects.Arguments implements IList
  • Sample database not included with the ContactManager example
  • Several issues with ExternalAspects in Silverlight
  • System.InvalidCastException: Unable to cast object of type PostSharp.Hosting.DotNet.ManagedDotNet40Platform' to type 'PostSharp.Hosting.NativeDotNetPlatform'.
  • Update check process throws exception on build servers
  • With MSIL serialization, system properties of MulticastAttributes are serialized, but should not

Next milestone: PostSharp 2.1 CTP 2.

Happy PostSharping!

-gael

Join us on April 28th as Gael Fraiteur and Kendall Miller (Gibraltar Software) speak with this month's LIVE Webinar guest Gary Short about overcoming the timeless challenges developers face in building fast and scalable systems.

Gary ShortGary is a frameworks technical evangelist for DevExpress, C# MVP, and frequent speaker at user groups and conferences throughout the UK, Europe and the U.S. -- including the upcoming DDD Scotland and TechEd conferences.

With presentation titles including How to Eat an Elephant, Data Mining the Social Web, and Credit Crunch Code, it's clear that Gary enjoys speaking about technical architecture.

In this month's LIVE Webinar you'll get a sneak peek at Gary's latest presentation, titled:

Asymptotics and Algorithms – What You’ve Forgotten Since University

Join the LIVE Webinar and discover:

  • The lost art of calculating which algorithm is more efficient than another, and...
  • Why managed environments, like .NET, may not know best.

Kendall MillerGiven the "big picture" performance theme of this month's Live Webinar, co-host Kendall Miller, will debut his latest presentation, titled:

Natural Laws of Software Performance

 

Join the LIVE Webinar and discover:

  • The natural laws that govern software performance
  • How technology has changed the tactics of high performance but is still at the mercy of these natural laws
  • How understanding these laws will help you create applications that scale without arcane tricks or endless hardware

Sign Up Now and Receive a Live Meeting URL Prior to Kickoff >>

CarlandRichard

For those of you who don’t yet subscribe to .NET Rocks! and its training video counterpart, dnrTV, you’re missing out on some wonderfully entertaining and informative talk shows.

Since 2002, Carl Franklin and Richard Campbell have been speaking with guests about programming in Microsoft .NET and, after nearly 650 episodes, show no signs of slowing down.

Gael was invited to be on .NET Rocks! in early February but, due to a bad phone line, he had to reschedule. Luckily both he and Carl attended this year’s NYC Code Camp, where they could finally sit down and record face-to-face. Or so he thought…

Listen to the first few minutes of the podcast to learn how Carl and Richard were finally able to record the show with Gael. Then, after you’ve had a good chuckle, continue listening to the podcast to learn more about programming with aspects.

DotNet Rocks

Listen to the podcast: http://www.dotnetrocks.com/default.aspx?showNum=640

Highlights include:

10:32 – What is an aspect?

12:10 – Using PostSharp for more than just Tracing and Logging

14:12 – Why having a bug in your aspect is safer than in the implementation of the manual line

20:20 – Two multithreading issues that can be solved using aspects

25:41 – Richard’s favorite example of AOP

36:43 – Static versus Dynamic AOP

40:08 – What’s next for PostSharp

Show the Code.

Gael also recorded a PostSharp demonstration with Carl on dnrTV. The shows on dnrTV are equally as entertaining as those on .NET Rocks! but with one very important difference: the code!

In this webcast-like format, guests are able to demonstrate technical topics in greater detail. That’s exactly what you’ll see in the recording with Gael as he dives deep into PostSharp – showing both common and advanced aspect usage.

dnrtv2

Watch the recording:  http://dnrtv.com/dnrtvplayer/player.aspx?ShowNum=0190

Highlights include:

02:10 – TraceArgumentsAspect : OnExceptionAspect

13:47 – TracePerformanceAspect : OnMethodBoundaryAspect

23:15 – CacheAttribute : MethodInterceptionAspect

45:57 – Undo/Redo

Special thanks to Carl and Richard for inviting Gael as a guest on both shows. And many thanks to all of you who watched the shows and provided feedback. Keep it coming.

Happy PostSharping!

-Britt