none
Unhandled Exception: Microsoft.VisualStudio.Coverage.Analysis.SymbolsNotFoundException: Symbols for image file RRS feed

  • Question

  • Hi,

    I am trying to convert .coverage file to .xml file with following code. coverage file has valid data in it and when I import into VS, it shows exactly what I want. But pragmatically it fails.

                CoverageInfo coverage = CoverageInfo.CreateFromFile(coverageFile);
                DataSet data = coverage.BuildDataSet(null);
                data.WriteXml(xmlFile);
                data.Dispose();
                coverage.Dispose();

    DataSet data = coverage.BuildDataSet(null); throws SymbolsNotFoundException

    Unhandled Exception: Microsoft.VisualStudio.Coverage.Analysis.SymbolsNotFoundException: Symbols for image file "App_Web_12eqtatz.dll" could not be found.
       at Microsoft.VisualStudio.Coverage.Analysis.Utility.SymbolsNotFoundException(String path)                               at Microsoft.VisualStudio.Coverage.Analysis.Vsp.VspSymbolReader.Reset()
       at Microsoft.VisualStudio.Coverage.Analysis.Vsp.VspSymbolReader.GetNextMethod(UInt32& methodId, String& methodName, String& undecoratedMethodName, String& className, String& namespaceName, IList`1 lines)
       at Microsoft.VisualStudio.Coverage.Analysis.CoverageInfo.BuildDataSet(Boolean summaryOnly, IEnumerable`1 tests, IEnumerable`1 modules)
       at Microsoft.VisualStudio.Coverage.Analysis.CoverageInfo.BuildDataSet(IEnumerable`1 tests)                              at CoverageReport.CoverageHelper.GenerateXML() in C:\AzureRepo\Coverage\CoverageReport\Application.cs:line 37
       at CoverageReport.CoverageHelper.Main(String[] args) in C:\AzureRepo\Coverage\CoverageReport\Application.cs:line 29

    Note: I am using VS2017 Enterprise edition Version 15.9.4. 

    1. I found few suggestions to place following assemblies in bin\debug directory of the project by coping from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies but no luck.

    Microsoft.VisualStudio.Coverage.Analysis.dllMicrosoft.VisualStudio.Coverage.Interop.dll, 

    Microsoft.VisualStudio.Coverage.Symbols.dll, dbghelp.dll

    2. Also placed Microsoft.VisualStudio.Coverage.Symbols.dll into c:\windows

    3. I am using Vsinstr and VSPerfCmd for profiling source assemblies

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64\vsinstr.exe

    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\x64\VSPerfCmd.exe

    Any help would be appreciated.

    Thanks,

    Mohan


    Wednesday, December 19, 2018 7:30 PM

Answers

  • Hi,

    When I further Investigate the issue, found that with the Installation of Visual Studio Enterprise edition Version 15.9.4, I do not see VSPerfCmd.exe, VSPerfMon.exe etc under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64" rather I could only found VSPerfCmd.exe, VSPerfMon.exe inside "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\x64". 

    When I install separately Performance Tools for Visual Studio 2017 (version 15.9) in the location "https://my.visualstudio.com/Downloads?q=Visual%20Studio%202017", I could see VSPerfCmd.exe, VSPerfMon.exe etc under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64"  and this made the issue resolved. I don't see any symbol not found exception at DataSet data = coverage.BuildDataSet(null); 

    This is just my guess of the issue resolution but I am not sure there might be some other reason that cause the issue to resolve after separate installation of Performance tools.

    Thanks,

    Mohan


    Saturday, December 29, 2018 6:10 AM

All replies

  • Hi Mohan Panigrahi,

    Thank you for posting here.

    For your question, you could try the suggestion below. It seems easy.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/e63c59d9-638b-4f8e-8f20-98f360f97d47/convert-coverage-file-to-xml?forum=vsunittest

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 21, 2018 7:12 AM
    Moderator
  • Hi Wendy,

    Thanks for your reply!

    Suggestion provided by Weiwei  in the suggested link looks to be not the case. The coverage file generated is a binary file and can't be open in Notepad. Moreover, I want this .coverage file to convert into .xml in C# code and NOT through VS IDE (which I can do without any issue).

    Note: I am using VSInstr and VSPerfCmd to generate the .coverage file.

    Any further suggestion would be appreciated.

    Thanks,

    Mohan


    Friday, December 21, 2018 8:30 AM
  • Hi,

    When I further Investigate the issue, found that with the Installation of Visual Studio Enterprise edition Version 15.9.4, I do not see VSPerfCmd.exe, VSPerfMon.exe etc under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64" rather I could only found VSPerfCmd.exe, VSPerfMon.exe inside "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\x64". 

    When I install separately Performance Tools for Visual Studio 2017 (version 15.9) in the location "https://my.visualstudio.com/Downloads?q=Visual%20Studio%202017", I could see VSPerfCmd.exe, VSPerfMon.exe etc under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64"  and this made the issue resolved. I don't see any symbol not found exception at DataSet data = coverage.BuildDataSet(null); 

    This is just my guess of the issue resolution but I am not sure there might be some other reason that cause the issue to resolve after separate installation of Performance tools.

    Thanks,

    Mohan


    Saturday, December 29, 2018 6:10 AM
  • This solution works for me. Great. 
    Thursday, October 10, 2019 3:04 AM