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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:52:38+00:00 2026-05-30T18:52:38+00:00

Background: I manage a fairly large solution. Every so often, people add a DLL

  • 0

Background: I manage a fairly large solution. Every so often, people add a DLL reference to a project in the solution where they should’ve added a project reference. I want to issue a warning in such case. I want to do it by finding all reference with ‘bin\debug’ in their HintPath*. I know that references are Items in ItemGroup, with metadata “HintPath”.

I expected something like this to work:

<Warning Text="Reference %(Reference.Identity) should be a project reference. HintPath: %(Reference.HintPath)"
         Condition="%(Reference.HintPath).IndexOf('bin\debug') != -1"/>

However, Seems like I can’t use string function IndexOf like that. I tried many permutations of the above, without success.

  • Edit: I know this check is not full-proof, but I just want to reduce honest mistakes.
  • 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-05-30T18:52:39+00:00Added an answer on May 30, 2026 at 6:52 pm

    Using MSBuild 4.0 Property Functions it is possible to do string comparisons:

    <Target Name="AfterBuild">
    
      <Message Text="Checking reference... '%(Reference.HintPath)'" Importance="high" />
    
      <Warning Text="Reference %(Reference.Identity) should be a project reference. HintPath: %(Reference.HintPath)"
                Condition="$([System.String]::new('%(Reference.HintPath)').Contains('\bin\$(Configuration)'))" />
    
    </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background I've been using the C preprocessor to manage and compile semi-large javascript projects
is there a solution to manage multiple background processes started by multiple users ?
Background: We have a TFS server setup where me manage our source code and
The Background A Cocoa Non Document Core Data project with two Managed Object Models.
We currently have an application that starts its own background services to manage syncing
Background: we have a Grails 1.3.7 app and are using Liquibase to manage our
Here's a simple python daemon I can't manage to run as a background process:
If you guys check out this webpage: http://www2.scandvision.se/oresund10/ How have they done this background
Background: I have a webpage that lists latest 30 tweets from twitter. But every
Background: I am using Hyper-V on Server 2008 to manage many virtual servers. I

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.