(source: help – MSBuild Extension Pack)
- Download and install at download MSBuild Extension Pack
(keep all as default settings)
- At the beginning of your build script, add the following line:
- After that, you can start using the MSBuild Exgtension Pack ‘s tasks.
Intellisense in Visual Studio : http://www.msbuildextensionpack.com/help/188.8.131.52/Configuring%20Intellisense.htm
The following table describes the MSBuild reserved properties.
||The absolute path of the directory where the project file is located, for example, C:\MyCompany\MyProduct.
||The complete file name of the project file, including the file name extension, for example, MyApp.proj.
||The file name extension of the project file, including the period, for example, .proj.
||The absolute path and complete file name of the project file, for example, C:\MyCompany\MyProduct\MyApp.proj.
||The file name of the project file without the file name extension, for example, MyApp.
||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.
||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” >
||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.
||The absolute path of the directory where MSBuild is invoked.
This allows you to go to any point in a project tree and build everything below that point without having to create “dirs.proj”-type files in every directory. Instead, you have only a single project, like this example called c:\traversal.proj:
Then at any point in the tree you would type: