C# • Create a Project File

Listing 1. The project file defines how to build the application. You need to put this and related files in a directory, then open a Longhorn SDK command prompt, navigate to the directory containing your files, and run MSBuild. This compiles your program into an executable.

<Project DefaultTargets="Build">
      <Property Language="C#" />
      <Property DefaultClrNameSpace="IntroLonghorn" />
      <Property TargetName="HelloWorld" />

   <!--Imports the target which contains all the       common targets-->
   <Import Project="$(LAPI)\WindowsApplication.target" />

      <!-- Application markup -->
         Include="HelloWorldApplication.xaml" />
      <!-- Compiled Xaml Files list -->
      <Item Type="Pages" Include="HelloWorld.xaml"/>