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 8038965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:25:01+00:00 2026-06-05T03:25:01+00:00

I am in the process of evaluating the NDepend tool for a client of

  • 0

I am in the process of evaluating the NDepend tool for a client of mine, and was wondering if anyone could provide assistance with the following query:

// <Name>Potentially dead Assemblies</Name>
warnif count > 0 
    from a in JustMyCode.Assemblies where
       a.NbTypesUsingMe == 0
       select a

Although this provides a large list, I would also like to check if the only reference is from a test project such as MyNamespace only referenced by MyNamespace.Tests.

How could this be done? I have not found documentation on creating a IsUsedBy that does not take a constant.

Sincerely,

Martin

  • 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-05T03:25:03+00:00Added an answer on June 5, 2026 at 3:25 am

    For matching dead assemblies, you don’t need to count types but just to count assemblies using me:

    warnif count > 0 
    from a in JustMyCode.Assemblies where
      a.AssembliesUsingMe.Count() == 0
      select a
    

    If you want to match a condition on types using an assembly you can write something like:

    warnif count > 0 
    from a in JustMyCode.Assemblies
    let typesUser =  Application.Types.Using(a)
    where typesUser.Count() == 0 ||
          typesUser.ParentNamespaces()
          .WithNameWildcardMatchNotIn("MyNamespace.Tests*").Count() == 0
    select a
    

    Notice how in this previous query we don’t even iterate on typesUser (with a typesUser.Where(t => ...) ), but instead we use NDepend.API set methods like WithNameWildcardMatchNotIn().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of evaluating FindBugs and am trying to make use
I am planning on introducing Java rules and currently in the process of evaluating
We're re-evaluating our database upgrade process for our application to try and remove the
I process data with two maps per records, one is (&,=)-formatted (id=111&name=...), the other
I am in the process of evaluating several service frameworks and one of them
I am in the process of evaluating an upgrade to Windows SDK 7.1 Part
I'm in the process of evaluating the benefits of Zend_Config_Ini versus using a simple
Basically I am in the process of evaluating thrift for an upcoming project. What
I am in process of evaluating ORM first time. Please suggest which one i
I'm in the process of evaluating db4o and I have a pretty simple question.

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.