Custom MSBuild Task Development with Visual C++

Visual C++ 2010 sees the integration of MSBuild with Visual C++. MSBuild is Microsoft's common build engine and one of its key design goals is the ability to support a high-degree of flexibility in customizing the build process. See how a custom MSBuild task can be built in Visual C++, and how the task can be used to customize the build process of other Visual C++ 2010 projects.

The introduction of MSBuild in Visual C++ 2010 opens up the C++ compilation and linking process to a high degree of customization and extension. Prior to MSBuild, the build process could only be extended with pre- and post-build steps that offered limited flexibility and were decoupled from the rest of the build process. In contrast, MSBuild allows fine-tuned, integrated extension, and any new-format Visual C++ project file (vcxproj) can be customized to complete whatever task is required during a build.

In my last Using Visual C++.NET article, MSBuild basics were covered, including Tasks, which are the building-blocks of the build process. Tasks take items and properties to complete some action, and tasks are chained together in targets, with targets being the entry point into a MSBuild file. MSBuild and Visual C++ ship with a large number of predefined tasks, but in the spirit of MSBuild extensibility, custom task development is extremely easy with helper classes present in the MSBuild assemblies. The remainder of this article will cover the process of building a custom MSBuild task in C++/CLI and then using this task in a Visual C++ 2010 project.



Developing the Hard Link Task



The NT File System (NTFS) supports a feature known as hard links, which allows multiple directory entries to map to the same underlying file. Hard links have a number of advantages over simply copying a file, with the main advantage being that, because all directory entries point to the same physical file, an update to the file is automatically available to all consumers of the file regardless of which directory entry the file is accessed through. Using hard links also conserves disk space, as multiple copies of the same file are not scattered randomly across a drive.

Read the Rest of this Article at Developer.com

Regional Articles
- Custom MSBuild Task Development with Visual C++ Alabama
- Custom MSBuild Task Development with Visual C++ Alaska
- Custom MSBuild Task Development with Visual C++ Arizona
- Custom MSBuild Task Development with Visual C++ Arkansas
- Custom MSBuild Task Development with Visual C++ California
- Custom MSBuild Task Development with Visual C++ Colorado
- Custom MSBuild Task Development with Visual C++ Connecticut
- Custom MSBuild Task Development with Visual C++ DC
- Custom MSBuild Task Development with Visual C++ Delaware
- Custom MSBuild Task Development with Visual C++ Florida
- Custom MSBuild Task Development with Visual C++ Georgia
- Custom MSBuild Task Development with Visual C++ Hawaii
- Custom MSBuild Task Development with Visual C++ Idaho
- Custom MSBuild Task Development with Visual C++ Illinois
- Custom MSBuild Task Development with Visual C++ Indiana
- Custom MSBuild Task Development with Visual C++ Iowa
- Custom MSBuild Task Development with Visual C++ Kansas
- Custom MSBuild Task Development with Visual C++ Kentucky
- Custom MSBuild Task Development with Visual C++ Louisiana
- Custom MSBuild Task Development with Visual C++ Maine
- Custom MSBuild Task Development with Visual C++ Maryland
- Custom MSBuild Task Development with Visual C++ Massachusetts
- Custom MSBuild Task Development with Visual C++ Michigan
- Custom MSBuild Task Development with Visual C++ Minnesota
- Custom MSBuild Task Development with Visual C++ Mississippi
- Custom MSBuild Task Development with Visual C++ Missouri
- Custom MSBuild Task Development with Visual C++ Montana
- Custom MSBuild Task Development with Visual C++ Nebraska
- Custom MSBuild Task Development with Visual C++ Nevada
- Custom MSBuild Task Development with Visual C++ New Hampshire
- Custom MSBuild Task Development with Visual C++ New Jersey
- Custom MSBuild Task Development with Visual C++ New Mexico
- Custom MSBuild Task Development with Visual C++ New York
- Custom MSBuild Task Development with Visual C++ North Carolina
- Custom MSBuild Task Development with Visual C++ North Dakota
- Custom MSBuild Task Development with Visual C++ Ohio
- Custom MSBuild Task Development with Visual C++ Oklahoma
- Custom MSBuild Task Development with Visual C++ Oregon
- Custom MSBuild Task Development with Visual C++ Pennsylvania
- Custom MSBuild Task Development with Visual C++ Rhode Island
- Custom MSBuild Task Development with Visual C++ South Carolina
- Custom MSBuild Task Development with Visual C++ South Dakota
- Custom MSBuild Task Development with Visual C++ Tennessee
- Custom MSBuild Task Development with Visual C++ Texas
- Custom MSBuild Task Development with Visual C++ Utah
- Custom MSBuild Task Development with Visual C++ Vermont
- Custom MSBuild Task Development with Visual C++ Virginia
- Custom MSBuild Task Development with Visual C++ Washington
- Custom MSBuild Task Development with Visual C++ West Virginia
- Custom MSBuild Task Development with Visual C++ Wisconsin
- Custom MSBuild Task Development with Visual C++ Wyoming

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML