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

  • Home
  • SEARCH
  • 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 5970519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:23:08+00:00 2026-05-22T20:23:08+00:00

I have custom MSBuild project file with few <ProjectReferences> . I’m calling the <MSBuild

  • 0

I have custom MSBuild project file with few <ProjectReferences>.
I’m calling the <MSBuild Projects="@(ProjectReference)" Targets="Build"> task and I can get all the built assemblies using the <Output TaskParameter="TargetOutputs" ItemName="OutputAssemblies" /> element and I’m copying @(OutputAssemblies) to destination directory.

I want to able to get the @(ReferenceCopyLocalPaths) item property from the ResolveAssemblyReferences target but I can’t figure out how to output this property.

<Target Name="BuildDocumentationForReferencedProjects">
  <MSBuild
    Projects="@(ProjectReference)"
    Targets="Build"
    BuildInParallel="true"
    Properties="DocumentationFile=$(DllDir)\%(FileName).xml"
  >
    <Output TaskParameter="TargetOutputs" ItemName="OutputAssemblies" />
  </MSBuild>

  <Copy SourceFiles="@(OutputAssemblies)" DestinationFolder="$(DllDir)" />
</Target>
  • 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-22T20:23:09+00:00Added an answer on May 22, 2026 at 8:23 pm

    Add the following custom target to your project file, or to a file imported by all projects you want to get this behavior with…

      <Target Name="MyResolveReferences"
        DependsOnTargets="ResolveReferences"
        Returns="@(ReferenceCopyLocalPaths)">
      </Target>
    

    Then, you can call this target directly and capture the item array you are interested in, since this transitory target declares it as its “Returns” value,

      <Target Name="BuildDocumentationForReferencedProjects">
       <MSBuild
         Projects="@(ProjectReference)"
         Targets="MyResolveReferences"
         ...
         >
         <Output
            TaskParameter="TargetOutputs"
            ItemName="MyReferenceCopyLocalPaths"
            />
       </MSBuild>
       <Message Text="Paths = '@(MyReferenceCopyLocalPaths)'" />
      </Target>
    

    In addition to @(ReferenceCopyLocalPaths) there are a number of other item arrays that might be interesting, just look in Microsoft.Common.targets at all the Outputs declared for the call to the ResolveAssemblyReference task in the ResolveAssemblyReferences target (mine is ~line 1400).

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

Sidebar

Related Questions

I have written a few MSBuild custom tasks that work well and are use
I have a custom MSBuild task that peeks inside an assembly to get some
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For
I have a few models that need to have custom find conditions placed on
I’m using a few custom MSBuild tasks that are checked into source control. I
I have a number of custom Item and Project Templates for Visual Studio 2010.
Short version: I have an MSBuild project that imports another project. There is a
I was looking around the net for a NUnit custom MSBuild task that would
I wrote a custom MSBuild task which calls SubWCRev.exe , an executable which (typically)
I have custom coded several enterprise applications for mid to large organizations to use

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.