diff --git a/src/AddIns/Misc/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs b/src/AddIns/Misc/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs index d3e0d87b1f..b746934512 100644 --- a/src/AddIns/Misc/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs +++ b/src/AddIns/Misc/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs @@ -89,7 +89,7 @@ namespace ICSharpCode.CodeCoverage // will ignore any type that has no source code available // for it even though the type may be in the Part Cover // results file. - if (settings.Include.Count + settings.Exclude.Count == 0) { + if (settings.Include.Count == 0) { settings.Include.Add("[*]*"); } @@ -177,6 +177,7 @@ namespace ICSharpCode.CodeCoverage void AddStringsToCollection(StringCollection source, StringCollection target) { + target.Clear(); foreach (string item in source) { target.Add(item); }