Getting PostSharp working with VSTO for Add-in Exception Management - Missing Reference PostSharp.Laos

216 Views Asked by At

I am trying to get PostSharp set up with my VSTO addin project so that there is a centralized way to catch all exceptions.

I followed the guide here: http://exceptionalcode.wordpress.com/2010/02/17/centralizing-vsto-add-in-exception-management-with-postsharp/

first I downloaded and installed PostSharp. Then per the installation guide I added PostSharp to my VS project and I checked and it shows up in 'Manage NuGet Packages...'

however I am getting missing references regarding the 'using PostSharp.Laos;' statement saying that it cannot resolve the symbol 'Laos'.

Did I miss a setup step or are the instructions in the guide I am following out of date for the latest version of PostSharp?

1

There are 1 best solutions below

1
On BEST ANSWER

looks like the guide was out of date.

I fixed it by swapping out 'using PostSharp.Laos;' with 'using PostSharp.Aspects;' and 'MethodExecutionEventArgs' with 'MethodExecutionArgs' from the code samples