none
Invalid symbol data for file RRS feed

  • Question

  • I have a series of valid .coverage files which I am trying to combine into a single dataset using the Microsoft.VisualStudio.Coverage.Analysis.CoverageInfo.BuildDataSet() method. However, I am getting an exception "Microsoft.VisualStudio.CodeCoverage.Analysis.SymbolsNotFoundException: Symbols for image file 'myassembly.dll' could not be found." I need help resolving this exception.

    Things I have verified/tried:

    • Verified that the individual .coverage files are valid and containing coverage data even for assemblies where I am receiving the above exception.
    • Verified that the instrumented .dlls, .pdbs, .coverage files, and below code are all located in the same directory.
    • When I call the CoverageInfo.CreateFromFile overload containing a MissingFileCallback, I see the Filename of the missing file supplied as "myassembly.instr.pdb" rather than "myassembly.pdb". Not sure if this is correct or not. It seems suspicious to me but I have no idea what would be appending ".instr" to my filename, or how to resolve that.

    FYI the original .coverage files were generated using VS2017.  The code I am using to try to combine these .coverage files is as follows: 

    public static void CombineFiles(IEnumerable<string> files, string DestFilePath)
            {
                CoverageDS data = JoinCoverageFiles(files).BuildDataSet();
                data.ExportXml(DestFilePath);
            }
    
    // From https://blogs.msdn.microsoft.com/phuene/2009/12/04/programmatic-code-coverage-data-merging-in-visual-studio-2010/
    private static CoverageInfo JoinCoverageFiles(IEnumerable<string> files)
            {
                if (files == null)
                    throw new ArgumentNullException("files");
    
                // This will represent the joined coverage files
                CoverageInfo result = null;
    
                    foreach (string file in files)
                    {
                        // Create from the current file
    
                        CoverageInfo current = CoverageInfo.CreateFromFile(file, new MissingFileCallback(OnMissingFile));
                        if (result == null)
                        {
                            // First time through, assign to result
                            result = current;
                            continue;
                        }
    
                        // Not the first time through, join the result with the current
                        CoverageInfo joined = null;
    
                            joined = CoverageInfo.Join(result, current);
    
    
                        result = joined;
                    }
                }
                return result;
            }

    Monday, June 10, 2019 2:21 PM

Answers

  • Hi briancooke,

    Welcome to MSDN forum.

    According to your description, I found a similar issue here. Please install Performance tools for visual studio 2017, then check if there are VSPerfCmd.exe, VSPerfMon.exe etc under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64".

    Any feedback will be expected.

    Best Regards,

    Dylan


    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

    • Marked as answer by briancooke Monday, July 1, 2019 4:59 PM
    Tuesday, June 11, 2019 3:05 AM

All replies

  • Hi briancooke,

    Welcome to MSDN forum.

    According to your description, I found a similar issue here. Please install Performance tools for visual studio 2017, then check if there are VSPerfCmd.exe, VSPerfMon.exe etc under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools\x64".

    Any feedback will be expected.

    Best Regards,

    Dylan


    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

    • Marked as answer by briancooke Monday, July 1, 2019 4:59 PM
    Tuesday, June 11, 2019 3:05 AM
  • Hi briancooke,

    Does your issue is solved or not? If not, could you please share the detail error message when you debug the code?

    If you already found the solution, please share it in here or mark the helpful reply, that will help other community members, we can also close this thread for you, thanks for your understanding.

    Best Regards,

    Dylan


    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


    Wednesday, June 19, 2019 11:18 AM
  • Yes, that fixed it.  Thank you!

    Monday, July 1, 2019 5:00 PM