Exception caused when method returns a task
See original GitHub issueHi,
I’ve got a really weird bug with MrAdvice. I made a BaseAdvice Abstract class and I have an assembly advice inheriting from it. I’ve got no problems setting the IncludePointcutAttribute
and ExcludePointcutAttribute
on my assembly advice. Everything works except when I don’t include a method that returns a task. Whenever I do the Task.Start()
I get the following exception : System.InvalidOperationException: 'Start may not be called on a continuation task.'
That only happens when you exclude it on the assembly advice. If I include it, it works. If I add [ExcludeAdvices("*")]
on my class the contains the method, it works. Also, if I add the ExcludePointcutAttribute
on my BaseAdvice class, it also works. That’s really strange. Here’s the code I made to show the problem:
TestConsole.zip
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Thanks a lot! I confirm everything is now working correctly!
Weird indeed… I’ll take a look at it.