I had an issue where async methods weren't being covered. I know async methods cause the compiler to output generated methods for the async state machine. This link has more information: https://github.com/coverlet-coverage/coverlet/issues/1437
My settings file had this:
<Include>[*]MyNamespace.MyClass</Include>
but in order to include the async methods, I needed to put a wildcard:
<Include>[*]MyNamespace.MyClass*</Include>
This workaround is working, however it's not intuitive for most people who don't know that async methods become something else. Also this would include other classes like MyClass1 which I don't want to include.
I'm not sure if there's a solution but just putting it here because it causes problems for people.
I had an issue where async methods weren't being covered. I know async methods cause the compiler to output generated methods for the async state machine. This link has more information: https://github.com/coverlet-coverage/coverlet/issues/1437
My settings file had this:
<Include>[*]MyNamespace.MyClass</Include>
but in order to include the async methods, I needed to put a wildcard:<Include>[*]MyNamespace.MyClass*</Include>
This workaround is working, however it's not intuitive for most people who don't know that async methods become something else. Also this would include other classes like
MyClass1
which I don't want to include.I'm not sure if there's a solution but just putting it here because it causes problems for people.