visual-coverage icon indicating copy to clipboard operation
visual-coverage copied to clipboard

easy fix to support *.coveragexml

Open BrannonKing opened this issue 10 years ago • 0 comments

The VisualCoverage tool suffers from the same issue reported here:

http://stackoverflow.com/questions/4170803/programmatically-reading-vs-coveragexml-file-in-c-sharp

To fix it, I changed the Parse method to include this code:

            var xmls = inputfiles.Where(s => s.EndsWith(".coveragexml"));
            inputfiles = inputfiles.Except(xmls).ToArray();

            // Open file
            using (CoverageInfo info = JoinCoverageFiles(inputfiles))
            {
                var dataSet = new CoverageDS();
                foreach (var xml in xmls)
                {
                    dataSet.ImportXml(xml);
                }

                if (info != null)
                    dataSet.Merge(info.BuildDataSet());

BrannonKing avatar Mar 12 '14 15:03 BrannonKing