4

I added PostSharp via NuGet (PostSharp.4.0.40, but I also checked the .39 version), created a class inheriting from OnExceptionAspect (e.g. CustomExceptionBehaviour - I tested previously this aspect working for me in a sample Console application), how ever on any exception in the method decorated with CustomExceptionBehaviour the OnException behaviour doesn't get executed (and checking the generated assembly indeed there is no try-catch inside the method).

The project build output doesn't contain any warnings about PostSharp. I checked into the project properties, PostSaharp tab and found the 'Add PostSharp to this project' button but when I click on it nothing happens ...

Any ideas why it's not working ?

aly
  • 373
  • 2
  • 7
  • 22
  • 3
    This seems like a bug, installing nuget package should be enough to get postsharp working. It is worth to report this bug [here](https://www.postsharp.net/Support/HelpDesk.aspx?userType=community). Please, could you check csproj file if it contains something like ` – Jakub Linhart Jan 29 '15 at 08:42
  • I added the 4.0.41 version using the _Package Manager Console_ and it worked ok, the issue doesn't reproduce any more. – aly Jan 30 '15 at 17:53

0 Answers0