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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:07:15+00:00 2026-05-23T10:07:15+00:00

What are the differences when referring to variables in MSBuild. For example in the

  • 0

What are the differences when referring to variables in MSBuild. For example in the following there is a @ and $ and as well as a % used.

<Copy SourceFiles="@(Files)" DestinationFolder="$(TempBuildDir)\%(RecursiveDir)">
   <Output TaskParameter="CopiedFiles" ItemName="DeployFiles" />
</Copy>
  • 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-23T10:07:15+00:00Added an answer on May 23, 2026 at 10:07 am

    $ denotes access to a property (some kind of variable that contains a simple value)

    @ is for item, which typically is a group of files with attached metadatas under a name

    % denote an access to a metadata of an item. There are wellknown metadatas (like RecursiveDir, see the definition in msdn) automatically attached to an item, or you can attach your own metadata when you define your items

    lets say you define @(files) like this:

    <ItemGroup>
       <Files include='c:\source\**\*.*'>  <!-- all files in all subfolder in c:\source -->
         <Color>Blue</Color> <!-- attach metadata color = 'Blue' to these files -->
       </Files>
       <Files include='c:\source2\**\*.*'>  <!-- all files in all subfolder in c:\source2 -->
         <Color>Red</Color> <!-- attach metadata color = 'Red' to these files -->
       </Files>
    </ItemGroup>
    

    if c:\source contains files 1.txt, b/2.dll , c/3.xml, and c:\source2 contains a/4.exe, @(Files) is formed like this

    • file c:\source\1.txt, with metadata
      color = ‘Blue’ and RecursiveDir = ”

    • file c:\source\b\2.dll, with metadata
      color = ‘Blue’ and RecursiveDir = ‘b’

    • file c:\source\c\3.xml, with metadata
      color = ‘Blue’ and RecursiveDir = ‘c’

    • file c:\source2\a\4.exe, with
      metadata color = ‘Red’ and
      RecursiveDir = ‘a’

    If you define TempBuildDir like this

    <PropertyGroup>
     <TempBuildDir>c:\temp<TempBuildDir>
    </PropertyGroup>
    

    You have some kind of variable that contains a simple value : c:\temp

    Your examples reads like this : copy every files defined in item File in a directory that is formed by concatening value of variable TempBuildDir with the Recursive directory where you found the file.

    You end up with :

    • c:\temp\1.txt

    • c:\temp\b\2.dll

    • c:\temps\c\3.xml

    • c:\temp\a\4.exe

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

Sidebar

Related Questions

Are there any noted differences in appearance rendering of HTML and XHTML in Google
Are there any major differences in performance between http and https? I seem to
Referring to a ~2-year old discussion of the fact that there is no operator
When I've used older APIs, for example, the C sockets API on Unix, I
What are the main differences (if any) between the box models of IE8 and
What are the differences between these two, and which one should I use? string
What are the differences between delegates and an events? Don't both hold references to
What are the differences between a HashMap and a Hashtable in Java? Which is
What are the differences between htmlspecialchars() and htmlentities() . When should I use one
What are the differences in implementing interfaces implicitly and explicitly in C#? When should

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.