Feeds:
Posts
Comments

Archive for the ‘automating software build process’ Category

(source: help – MSBuild Extension Pack)

Get started:

  1. Download and install at download MSBuild Extension Pack
    (keep all as default settings)
  2. At the beginning of your build script, add the following line:
    <Import Project=”$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks”/>
  3. After that, you can start using the MSBuild Exgtension Pack ‘s tasks.

Intellisense in Visual Studio : http://www.msbuildextensionpack.com/help/3.5.5.0/Configuring%20Intellisense.htm

Read Full Post »

Identity The value that was specifi ed in the Include attribute of the item after it was evaluated.
FullPath Full path of the fi le.
Rootdir The root directory to which the file belongs.
Filename The name of the file, not including the extension.
Extension The extension of the file, including the ‘.’.
RelativeDir The path to the file relative to the current working directory.
Directory Directory of the item, without the root directory.
RecursiveDir This is the part of the directory path that is replaced by the first ** of the Include declaration. If no ** is present, then this value is empty.
ModifiedTime The last time the file was modifi ed.
CreatedTime The time the file was created.
AccessedTime The last time the file was accessed.

Read Full Post »

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”/>

MSBuildStartupDirectory 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:

Copy

<Project …>

<ItemGroup>

<ProjectFiles

Include=”$

(MSBuildStartupDirectory)

**\*.csproj”/>

</ItemGroup>

<Target>

<MSBuild

Projects=”@(ProjectFiles)”/>

</Target>

</Project>

Then at any point in the tree you would type:

Copy

msbuild c:\traversal.proj

Read Full Post »

Older Posts »