Welcome to MSDN Blogs Sign in | Join | Help

Overriding precedence for properties in MSBuild

 

You can set the value of property in the following manner

  1. pass the value in proj/targets file inside PropertyGroup tag
  2. pass the value in the msbuild command line using /p switch
  3. pass the value of the property in rsp file using /property switch
  4. pass the value by using CreateProperty task

Precedence order

  1. Value specified using CreateProperty task will always have the highest precedence.
  2. Value specified in task/targets file under PropertyGroup tag will have the least precedence
  3. Value specified using command line or rsp file have equal precedence. The one passed later will override the earlier one. For example if rsp file set Name = “RspName” and the command line set Name = “CmdName”.
    1. Calling msbuild @rspfile /p:Name=CmdName will set the value of Name property to CmdName
    2. Calling msbuild /p:Name=CmdName @rspfile will set the value of Name property to RspName
Published Thursday, March 02, 2006 1:11 PM by ManishAgarwal

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# VSTS Links - 03/03/2006

Manish Agarwal blogs on overriding precedence for properties in MSBuild.

Josh Ledgard tells us that...
Friday, March 03, 2006 9:54 AM by Team System News

# How to customize the drop location in team build?

For eaxmple in your tfsbuild.proj, the value of DropLocation is \\machine\drop1 and you want to...
Wednesday, April 12, 2006 2:30 AM by Manish Agarwal

# re: Overriding precedence for properties in MSBuild

Best of the text i read about a problem.
Thursday, June 01, 2006 8:22 PM by rape stories

# re: Overriding precedence for properties in MSBuild

Greatings to you. Can you help me to find any more info?

<a href=http://www.maxpages.com/rapes/>forced sex movies</a>
Sunday, June 11, 2006 5:37 PM by forced sex movies

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker