diff --git a/src/Readme.txt b/src/Readme.txt index b8881129..21c96615 100644 --- a/src/Readme.txt +++ b/src/Readme.txt @@ -69,6 +69,7 @@ CHANGELOG 5.3.5.0 + * New: #663: Improved support for Cobertura files generated by "Microsoft CodeCoverage" * New: #674: License can now be supplied via the REPORTGENERATOR_LICENSE environment variable 5.3.4.0 diff --git a/src/ReportGenerator.Core/Parser/CoberturaParser.cs b/src/ReportGenerator.Core/Parser/CoberturaParser.cs index adf33375..796e661f 100644 --- a/src/ReportGenerator.Core/Parser/CoberturaParser.cs +++ b/src/ReportGenerator.Core/Parser/CoberturaParser.cs @@ -153,6 +153,12 @@ private Assembly ProcessAssembly(XElement[] modules, string assemblyName) if (fullname.Contains("<")) { + if (fullname.Contains("__") + || fullname.Contains(".<>")) + { + return Tuple.Create(string.Empty, string.Empty); + } + var match = AsyncClassRegex.Match(fullname); if (match.Success) @@ -166,7 +172,8 @@ private Assembly ProcessAssembly(XElement[] modules, string assemblyName) return Tuple.Create(fullname, fullname); }) .Where(c => this.RawMode - || (!c.Item1.Contains("$") + || (c.Item1 != string.Empty + && !c.Item1.Contains("$") && (!c.Item1.Contains("<") || GenericClassRegex.IsMatch(c.Item1)))) .Distinct() .Where(c => this.ClassFilter.IsElementIncludedInReport(c.Item1))