Friday, January 06, 2006

MSBuild - Part 2

Implementing MSBuild in Whidbey

You can implement MSBuild in Whidbey by creating an MSBuild project file that you can use to compile a .NET project. The MSBuild project file is an XML file with the .proj extension. The MSBuild project file describes the build process of a .NET project. A console application of the MSBuild tool, called msbuild.exe, performs the build process. This application receives project files as input and processes them synchronously. You can create an MSBuild project file using the Visual Studio .NET IDE. To create an MSBuild project file:

1.         Create a folder, MSBuild, at the C:\WINNT\System32\ location to save the project file.

2.         Copy the msbuild.exe file from the C:\WINNT\Microsoft.NET\Framework\v2.0.40607 location and save it at the C:\WINNT\System32\MSBuild location.

3.         Select Start -> Programs -> Microsoft Visual Studio Whidbey -> Microsoft Visual Studio codename Whidbey to open the Microsoft Visual Studio Whidbey IDE.

4.         Select File -> New -> File to open the New File window

5.      Select XML File and click Open to open the Code Editor window
Enter the code in the Code Editor window to create an MSBuild project file.

6.      Select File -> XMLFile1.xml to open the Save File As dialog box.

7.      Select the MSBuild directory from the Save in drop-down list box to specify the location where you want to save the project file.

8.      Select the All Files (*.*) option from the Save as type drop-down list box and enter the MSBuildProj file name with the .proj extension in the File name text box to create an MSBuild project file.

9.      Enter the following command at the command prompt to build the MSBuild project file that you create:

       WINNT\System32\MSBuild MSBuild MSBuildProj.proj

No comments: