Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 2.0
General Reference
MSBuild Reference
 Reserved Properties
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:

Want more? Here are some additional resources on this topic:

.NET Framework General Reference 
MSBuild Reserved Properties 

MSBuild provides a set of reserved properties that store information about the project fille and the MSBuild binaries. These properties are evaluated the same as other MSBuild properties. For example, to use the MSBuildProjectFile property, you would type:

$(MSBuildProjectFile)

The following table describes the MSBuild reserved properties.

Property Description

MSBuildProjectDirectory

The absolute path of the directory where the project file is located, for example, C:\MyCompany\MyProduct.

MSBuildProjectFile

The complete file name of the project file, including the file name extension, for example, MyApp.proj.

MSBuildProjectExtension

The file name extension of the project file, including the period, for example, .proj.

MSBuildProjectFullPath

The absolute path and complete file name of the project file, for example, C:\MyCompany\MyProduct\MyApp.proj.

MSBuildProjectName

The file name of the project file without the file name extension, for example, MyApp.

MSBuildBinPath

The absolute path of the directory where the MSBuild binaries that are currently being used are located, for example, C:\Windows\Microsoft.Net\Framework\v2.0. This property is useful if you need to refer to files in the MSBuild directory.

MSBuildProjectDefaultTargets

The complete list of targets specified in the DefaultTargets attribute of the Project element. For example, the following Project element would have an MSBuildDefaultTargets property value of A;B;C.

<Project DefaultTargets="A;B;C" >

MSBuildExtensionsPath

The MSBuild folder under the Program Files directory. This location is a useful place to put custom target files. For example, your targets files could be installed at \Program Files\MSBuild\MyFiles\Northwind.targets and then imported in project files with the following XML.

<Import Project="$(MSBuildExtensionsPath)\MyFiles\Northwind.targets"/>

Concepts

MSBuild Properties

Other Resources

MSBuild Reference

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker