I want to exclude MVC views—i.e., cshtml files, which have C# code—from code the coverage report in ADO.
What I have tried is:
Adding the
[ExcludeFromCodeCoverage]attribute to thecshtml.Adding exclusion for the
*.Viewsassembly in therunsettingsfile:<ModulePath>.*Views.*</ ModulePath>
Neither worked. Is there any way of achieving this?