You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is the option ExcludeByAttribute supported by the VSTest integreation?
The documentation does not list it as supported but the example file below includes the option.
I am asking because I have weird results when using it. When I add <ExcludeByAttribute>GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute> in my settings file not only code with the attributes get removed but also the coverage ignores complete methods from tested classes without the attributes.
Unfortunately I am not able to reproduce it with a new project and I can't share the code (work) :-/.
Perhaps I can share the generated cobertura files if that's enough and I get permission to do so.
Thanks in advance
The text was updated successfully, but these errors were encountered:
I am asking because I have weird results when using it. When I add GeneratedCodeAttribute,CompilerGeneratedAttribute in my settings file not only code with the attributes get removed but also the coverage ignores complete methods from tested classes without the attributes.
This happens because you cannot use CompilerGeneratedAttribute because every async/await code you use in your code will be trimmed out because that statements generates a state machine class(Roslyn compiler does it) with that attributes on top of class. So you don't see that code in coverage.
Sorry for my way too late response.
Yeah the CompilerGeneratedAttribute makes sense. Should have seen that.
Thanks for the link to 497. The skip autoproperties option is awesome. 👍🏻
Hey guys,
is the option ExcludeByAttribute supported by the VSTest integreation?
The documentation does not list it as supported but the example file below includes the option.
I am asking because I have weird results when using it. When I add
<ExcludeByAttribute>GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
in my settings file not only code with the attributes get removed but also the coverage ignores complete methods from tested classes without the attributes.Unfortunately I am not able to reproduce it with a new project and I can't share the code (work) :-/.
Perhaps I can share the generated cobertura files if that's enough and I get permission to do so.
Thanks in advance
The text was updated successfully, but these errors were encountered: