{"action":"created","issue":{"url":"https://api.github.com/repos/OpenCoverUI/OpenCover.UI/issues/82","labels_url":"https://api.github.com/repos/OpenCoverUI/OpenCover.UI/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/OpenCoverUI/OpenCover.UI/issues/82/comments","events_url":"https://api.github.com/repos/OpenCoverUI/OpenCover.UI/issues/82/events","html_url":"https://github.com/OpenCoverUI/OpenCover.UI/issues/82","id":95847921,"number":82,"title":"\"There is an error in XML document\" on <Method skippedDueTo=\"Unknown\"...","user":{"login":"meolus","id":11287595,"avatar_url":"https://avatars.githubusercontent.com/u/11287595?v=3","gravatar_id":"","url":"https://api.github.com/users/meolus","html_url":"https://github.com/meolus","followers_url":"https://api.github.com/users/meolus/followers","following_url":"https://api.github.com/users/meolus/following{/other_user}","gists_url":"https://api.github.com/users/meolus/gists{/gist_id}","starred_url":"https://api.github.com/users/meolus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meolus/subscriptions","organizations_url":"https://api.github.com/users/meolus/orgs","repos_url":"https://api.github.com/users/meolus/repos","events_url":"https://api.github.com/users/meolus/events{/privacy}","received_events_url":"https://api.github.com/users/meolus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-18T18:29:49Z","updated_at":"2015-07-19T17:41:41Z","closed_at":null,"body":"I am getting an exception on running \"Cover with OpenCover\" from Open Cover Test Explorer:\r\n\r\n>There is an error in XML document (1115, 21).\r\n>   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)\r\n>   at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)\r\n>   at OpenCover.UI.Processors.TestExecutor.GetExecutionResults()\r\n\r\nAt this position in test result xml I found below /CoverageSession/Modules/Module/Classes/Class/Methods/Method a \"skippedDueTo=\"Unknown\"\", which seems to cause the problem.\r\n\r\nThe \"class\" this part of the test result depends on is a delegate:\r\n> delegate void PortEventHandler(Port sender, PortEventArgs e);\r\n\r\nwhich is used for an event:\r\n> private event PortEventHandler _portEvent;\r\n\r\nThe Methods in rest result xml are ctor, Invoke, BeginInvoke and EndInvoke, all with \"skippedDueTo=\"Unknown\"\"."},"comment":{"url":"https://api.github.com/repos/OpenCoverUI/OpenCover.UI/issues/comments/122688214","html_url":"https://github.com/OpenCoverUI/OpenCover.UI/issues/82#issuecomment-122688214","issue_url":"https://api.github.com/repos/OpenCoverUI/OpenCover.UI/issues/82","id":122688214,"user":{"login":"meolus","id":11287595,"avatar_url":"https://avatars.githubusercontent.com/u/11287595?v=3","gravatar_id":"","url":"https://api.github.com/users/meolus","html_url":"https://github.com/meolus","followers_url":"https://api.github.com/users/meolus/followers","following_url":"https://api.github.com/users/meolus/following{/other_user}","gists_url":"https://api.github.com/users/meolus/gists{/gist_id}","starred_url":"https://api.github.com/users/meolus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meolus/subscriptions","organizations_url":"https://api.github.com/users/meolus/orgs","repos_url":"https://api.github.com/users/meolus/repos","events_url":"https://api.github.com/users/meolus/events{/privacy}","received_events_url":"https://api.github.com/users/meolus/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T17:41:41Z","updated_at":"2015-07-19T17:41:41Z","body":"I created a new minimal console project to reproduce the problem:\r\n\r\nProgram.cs in console application project:\r\n```csharp\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace ConsoleApplication1\r\n{\r\n    public delegate void MyEventHandler(Program sender, EventArgs e);\r\n\r\n    public class Program\r\n    {\r\n        public event MyEventHandler aEvent;\r\n\r\n        static void Main(string[] args)\r\n        {\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n\r\nUnitTest1.cs in test project:\r\n```csharp\r\nusing System;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing ConsoleApplication1;\r\n\r\nnamespace UnitTestProject1\r\n{\r\n    [TestClass]\r\n    public class UnitTest1\r\n    {\r\n        [TestMethod]\r\n        public void TestMethod1()\r\n        {\r\n            Program prog = new Program();\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nOpenCover Log output is:\r\n```log\r\n1 tests found\r\n-target:\"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe\" -targetargs:\"\\\"C:\\temp\\ConsoleApplication1\\UnitTestProject1\\bin\\Debug\\UnitTestProject1.dll\\\" /Tests:UnitTestProject1.UnitTest1 /Logger:trx\" -output:\"C:\\temp\\ConsoleApplication1\\OpenCover\\5f39417c-6b7c-4b4e-8576-a1a8f537ab59\\26e9ba67-bd63-48f0-ad8c-2c5a84d18aed.xml\" -hideskipped:All -register:user\r\n1 tests found\r\nExecuting: C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe\r\nMicrosoft (R) Test Execution Command Line Tool Version 12.0.30723.0\r\nCopyright (c) Microsoft Corporation.  All rights reserved.\r\n\r\nStarting test discovery, please wait...\r\nPassed   TestMethod1\r\nResults File: C:\\temp\\ConsoleApplication1\\OpenCover\\5f39417c-6b7c-4b4e-8576-a1a8f537ab59\\TestResults\\User_PC 2015-07-19 19_36_27.trx\r\n\r\nTotal tests: 1. Passed: 1. Failed: 0. Skipped: 0.\r\nTest Run Successful.\r\nTest execution time: 0,2494 Seconds\r\nCommitting...\r\nVisited Classes 1 of 2 (50)\r\nVisited Methods 1 of 2 (50)\r\nVisited Points 3 of 5 (60)\r\nVisited Branches 1 of 2 (50)\r\n\r\n==== Alternative Results (includes all methods including those without corresponding source) ====\r\nAlternative Visited Classes 2 of 3 (66.67)\r\nAlternative Visited Methods 3 of 6 (50)\r\n\r\n\r\nThere is an error in XML document (54, 21).\r\n   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)\r\n   at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)\r\n   at OpenCover.UI.Processors.TestExecutor.GetExecutionResults()\r\n```\r\n\r\nResults in a XML of:\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<CoverageSession xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n  <Summary numSequencePoints=\"5\" visitedSequencePoints=\"3\" numBranchPoints=\"2\" visitedBranchPoints=\"1\" sequenceCoverage=\"60\" branchCoverage=\"50\" maxCyclomaticComplexity=\"2\" minCyclomaticComplexity=\"1\" visitedClasses=\"1\" numClasses=\"2\" visitedMethods=\"1\" numMethods=\"2\" />\r\n  <Modules>\r\n    <Module hash=\"67-90-75-6A-36-34-3A-41-03-B6-6A-B7-9B-51-1E-A3-6C-71-CA-DA\">\r\n      <Summary numSequencePoints=\"3\" visitedSequencePoints=\"3\" numBranchPoints=\"1\" visitedBranchPoints=\"1\" sequenceCoverage=\"100\" branchCoverage=\"100\" maxCyclomaticComplexity=\"1\" minCyclomaticComplexity=\"1\" visitedClasses=\"1\" numClasses=\"1\" visitedMethods=\"1\" numMethods=\"1\" />\r\n      <FullName>C:\\temp\\ConsoleApplication1\\UnitTestProject1\\bin\\Debug\\UnitTestProject1.dll</FullName>\r\n      <ModuleName>UnitTestProject1</ModuleName>\r\n      <Files>\r\n        <File uid=\"1\" fullPath=\"c:\\temp\\ConsoleApplication1\\UnitTestProject1\\UnitTest1.cs\" />\r\n      </Files>\r\n      <Classes>\r\n        <Class>\r\n          <Summary numSequencePoints=\"3\" visitedSequencePoints=\"3\" numBranchPoints=\"1\" visitedBranchPoints=\"1\" sequenceCoverage=\"100\" branchCoverage=\"100\" maxCyclomaticComplexity=\"1\" minCyclomaticComplexity=\"1\" visitedClasses=\"1\" numClasses=\"1\" visitedMethods=\"1\" numMethods=\"1\" />\r\n          <FullName>UnitTestProject1.UnitTest1</FullName>\r\n          <Methods>\r\n            <Method visited=\"true\" cyclomaticComplexity=\"1\" sequenceCoverage=\"100\" branchCoverage=\"100\" isConstructor=\"false\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <Summary numSequencePoints=\"3\" visitedSequencePoints=\"3\" numBranchPoints=\"1\" visitedBranchPoints=\"1\" sequenceCoverage=\"100\" branchCoverage=\"100\" maxCyclomaticComplexity=\"1\" minCyclomaticComplexity=\"1\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"1\" numMethods=\"1\" />\r\n              <MetadataToken>100663297</MetadataToken>\r\n              <Name>System.Void UnitTestProject1.UnitTest1::TestMethod1()</Name>\r\n              <FileRef uid=\"1\" />\r\n              <SequencePoints>\r\n                <SequencePoint vc=\"1\" uspid=\"1\" ordinal=\"0\" offset=\"0\" sl=\"12\" sc=\"9\" el=\"12\" ec=\"10\" bec=\"0\" bev=\"0\" fileid=\"1\" />\r\n                <SequencePoint vc=\"1\" uspid=\"2\" ordinal=\"1\" offset=\"1\" sl=\"13\" sc=\"13\" el=\"13\" ec=\"42\" bec=\"0\" bev=\"0\" fileid=\"1\" />\r\n                <SequencePoint vc=\"1\" uspid=\"3\" ordinal=\"2\" offset=\"7\" sl=\"14\" sc=\"9\" el=\"14\" ec=\"10\" bec=\"0\" bev=\"0\" fileid=\"1\" />\r\n              </SequencePoints>\r\n              <BranchPoints />\r\n              <MethodPoint xsi:type=\"SequencePoint\" vc=\"1\" uspid=\"1\" ordinal=\"0\" offset=\"0\" sl=\"12\" sc=\"9\" el=\"12\" ec=\"10\" bec=\"0\" bev=\"0\" fileid=\"1\" />\r\n            </Method>\r\n            <Method visited=\"true\" cyclomaticComplexity=\"1\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"true\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <Summary numSequencePoints=\"0\" visitedSequencePoints=\"0\" numBranchPoints=\"0\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"1\" minCyclomaticComplexity=\"1\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"0\" numMethods=\"0\" />\r\n              <MetadataToken>100663298</MetadataToken>\r\n              <Name>System.Void UnitTestProject1.UnitTest1::.ctor()</Name>\r\n              <SequencePoints />\r\n              <BranchPoints />\r\n              <MethodPoint vc=\"1\" uspid=\"4\" ordinal=\"0\" offset=\"0\" />\r\n            </Method>\r\n          </Methods>\r\n        </Class>\r\n      </Classes>\r\n    </Module>\r\n    <Module hash=\"36-84-04-5F-68-B8-85-C6-6E-2A-DD-A2-4B-B5-01-D6-B8-7B-04-20\">\r\n      <Summary numSequencePoints=\"2\" visitedSequencePoints=\"0\" numBranchPoints=\"1\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"2\" minCyclomaticComplexity=\"1\" visitedClasses=\"0\" numClasses=\"1\" visitedMethods=\"0\" numMethods=\"1\" />\r\n      <FullName>C:\\temp\\ConsoleApplication1\\UnitTestProject1\\bin\\Debug\\ConsoleApplication1.exe</FullName>\r\n      <ModuleName>ConsoleApplication1</ModuleName>\r\n      <Files>\r\n        <File uid=\"3\" fullPath=\"c:\\temp\\ConsoleApplication1\\ConsoleApplication1\\Program.cs\" />\r\n      </Files>\r\n      <Classes>\r\n        <Class>\r\n          <Summary numSequencePoints=\"0\" visitedSequencePoints=\"0\" numBranchPoints=\"0\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"0\" minCyclomaticComplexity=\"0\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"0\" numMethods=\"0\" />\r\n          <FullName>ConsoleApplication1.MyEventHandler</FullName>\r\n          <Methods>\r\n            <Method skippedDueTo=\"Unknown\" visited=\"false\" cyclomaticComplexity=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"true\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <MetadataToken>100663297</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.MyEventHandler::.ctor(System.Object,System.IntPtr)</Name>\r\n            </Method>\r\n            <Method skippedDueTo=\"Unknown\" visited=\"false\" cyclomaticComplexity=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"false\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <MetadataToken>100663298</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.MyEventHandler::Invoke(ConsoleApplication1.Program,System.EventArgs)</Name>\r\n            </Method>\r\n            <Method skippedDueTo=\"Unknown\" visited=\"false\" cyclomaticComplexity=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"false\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <MetadataToken>100663299</MetadataToken>\r\n              <Name>System.IAsyncResult ConsoleApplication1.MyEventHandler::BeginInvoke(ConsoleApplication1.Program,System.EventArgs,System.AsyncCallback,System.Object)</Name>\r\n            </Method>\r\n            <Method skippedDueTo=\"Unknown\" visited=\"false\" cyclomaticComplexity=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"false\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <MetadataToken>100663300</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.MyEventHandler::EndInvoke(System.IAsyncResult)</Name>\r\n            </Method>\r\n          </Methods>\r\n        </Class>\r\n        <Class>\r\n          <Summary numSequencePoints=\"2\" visitedSequencePoints=\"0\" numBranchPoints=\"1\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"2\" minCyclomaticComplexity=\"1\" visitedClasses=\"0\" numClasses=\"1\" visitedMethods=\"0\" numMethods=\"1\" />\r\n          <FullName>ConsoleApplication1.Program</FullName>\r\n          <Methods>\r\n            <Method visited=\"false\" cyclomaticComplexity=\"2\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"false\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <Summary numSequencePoints=\"0\" visitedSequencePoints=\"0\" numBranchPoints=\"0\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"2\" minCyclomaticComplexity=\"2\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"0\" numMethods=\"0\" />\r\n              <MetadataToken>100663301</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.Program::add_aEvent(ConsoleApplication1.MyEventHandler)</Name>\r\n              <SequencePoints />\r\n              <BranchPoints />\r\n              <MethodPoint vc=\"0\" uspid=\"5\" ordinal=\"0\" offset=\"0\" />\r\n            </Method>\r\n            <Method visited=\"false\" cyclomaticComplexity=\"2\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"false\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <Summary numSequencePoints=\"0\" visitedSequencePoints=\"0\" numBranchPoints=\"0\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"2\" minCyclomaticComplexity=\"2\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"0\" numMethods=\"0\" />\r\n              <MetadataToken>100663302</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.Program::remove_aEvent(ConsoleApplication1.MyEventHandler)</Name>\r\n              <SequencePoints />\r\n              <BranchPoints />\r\n              <MethodPoint vc=\"0\" uspid=\"6\" ordinal=\"0\" offset=\"0\" />\r\n            </Method>\r\n            <Method visited=\"false\" cyclomaticComplexity=\"1\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"false\" isStatic=\"true\" isGetter=\"false\" isSetter=\"false\">\r\n              <Summary numSequencePoints=\"2\" visitedSequencePoints=\"0\" numBranchPoints=\"1\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"1\" minCyclomaticComplexity=\"1\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"0\" numMethods=\"1\" />\r\n              <MetadataToken>100663303</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.Program::Main(System.String[])</Name>\r\n              <FileRef uid=\"3\" />\r\n              <SequencePoints>\r\n                <SequencePoint vc=\"0\" uspid=\"7\" ordinal=\"0\" offset=\"0\" sl=\"18\" sc=\"9\" el=\"18\" ec=\"10\" bec=\"0\" bev=\"0\" fileid=\"3\" />\r\n                <SequencePoint vc=\"0\" uspid=\"8\" ordinal=\"1\" offset=\"1\" sl=\"19\" sc=\"9\" el=\"19\" ec=\"10\" bec=\"0\" bev=\"0\" fileid=\"3\" />\r\n              </SequencePoints>\r\n              <BranchPoints />\r\n              <MethodPoint xsi:type=\"SequencePoint\" vc=\"0\" uspid=\"7\" ordinal=\"0\" offset=\"0\" sl=\"18\" sc=\"9\" el=\"18\" ec=\"10\" bec=\"0\" bev=\"0\" fileid=\"3\" />\r\n            </Method>\r\n            <Method visited=\"true\" cyclomaticComplexity=\"1\" sequenceCoverage=\"0\" branchCoverage=\"0\" isConstructor=\"true\" isStatic=\"false\" isGetter=\"false\" isSetter=\"false\">\r\n              <Summary numSequencePoints=\"0\" visitedSequencePoints=\"0\" numBranchPoints=\"0\" visitedBranchPoints=\"0\" sequenceCoverage=\"0\" branchCoverage=\"0\" maxCyclomaticComplexity=\"1\" minCyclomaticComplexity=\"1\" visitedClasses=\"0\" numClasses=\"0\" visitedMethods=\"0\" numMethods=\"0\" />\r\n              <MetadataToken>100663304</MetadataToken>\r\n              <Name>System.Void ConsoleApplication1.Program::.ctor()</Name>\r\n              <SequencePoints />\r\n              <BranchPoints />\r\n              <MethodPoint vc=\"1\" uspid=\"9\" ordinal=\"0\" offset=\"0\" />\r\n            </Method>\r\n          </Methods>\r\n        </Class>\r\n      </Classes>\r\n    </Module>\r\n  </Modules>\r\n</CoverageSession>\r\n```"}}