Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8015695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:19:29+00:00 2026-06-04T20:19:29+00:00

Does anyone know how to programatically (using the TFS API) determine what binaries were

  • 0

Does anyone know how to programatically (using the TFS API) determine what binaries were set to be instrumented as part of a build on TFS?

For example, after running a build on TFS with code coverage it shows this in the output:

...
-> 2 binaries instrumented - 62% of all code blocks covered
        SomeAssembly.dll - 392 blocks covered, 368 blocks not covered
        SomeExe.exe - 584 blocks covered, 241 blocks not covered
...

I would like to programatically determine that “SomeAssembly.dll” and “SomeExe.exe” are the binaries that were instrumented as part of that build.

I have gotten as far as retrieving the Team Project via the TFS API but am not sure that gets me where I want to go:

TfsTeamProjectCollection collection = new TfsTeamProjectCollection(new Uri(versionControlURIRoot + defaultProjectDirectory))
var testManagementService = collection.GetService<ITestManagementService>();
ITestManagementTeamProject teamProject = testManagementService.GetTeamProject(projectName);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:19:31+00:00Added an answer on June 4, 2026 at 8:19 pm

    Here is the solution:

    Get the Team Project:

    TfsTeamProjectCollection collection = new TfsTeamProjectCollection(new Uri(versionControlURIRoot + defaultProjectDirectory));
        var testManagementService = collection.GetService<ITestManagementService>();
        ITestManagementTeamProject teamProject = testManagementService.GetTeamProject(projectName);
    

    Extract the assembly names from the Build Coverage metadata:

    List<string> assemblyNames = new List<string>();
    if (teamProject != null) {
        ICoverageAnalysisManager coverageAnalysisManager = teamProject.CoverageAnalysisManager;
        if (coverageAnalysisManager != null) {
            IBuildCoverage[] buildCoverage = coverageAnalysisManager.QueryBuildCoverage(buildURI, CoverageQueryFlags.Modules);
            List<string> assemblyNames = new List<string>();
            foreach (IBuildCoverage buildCoverageDetails in buildCoverage) {
                foreach (IModuleCoverage module in buildCoverageDetails.Modules) {
                        assemblyNames.Add(module.Name);
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi there does anyone know a way, programatically or using a tool, that I
Does anyone know how to programatically detect that a Windows server is part of
im using iphone sdk 3.1.2 Does anyone know how to programatically obtain the name
Does anyone know how to get the android device system log programatically using Java?
Does anyone know know how to programatically get the local date and time of
does anyone know if there's any good online tutorial for building pivot tables using
Does anyone know a way to find out programatically which physical disk holds a
Does anyone know if you can programatically upload books onto google books? Is there
Does anyone know how to change the Bluetooth device name programatically? Or where is
Does anyone know if you can programmatically save a report shown in a reportviewer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.