Wiki

Changes between Version 3 and Version 4 of MsxBuild

Show
Ignore:
Timestamp:
12/28/10 01:20:52 (14 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MsxBuild

    v3 v4  
    77{{{ 
    88#!xml 
    9 <Project DefaultTargets="Compile" 
     9<Project DefaultTargets="Build" 
    1010    xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    1111 
    12 <!-- to-do: provide a sample for Cobra --> 
     12        <PropertyGroup> 
     13                <ProjectName>Company.Project</ProjectName> 
     14        <OutputDir>build</OutputDir> 
     15                <BuildPartsDir>parts</BuildPartsDir> 
     16        </PropertyGroup> 
     17 
     18        <ItemGroup> 
     19 
     20                <CobraFlags Include="-d"/> 
     21                <CobraFlags Include="-correct-source"/> 
     22 
     23                <CobraFiles Include="source\A.cobra"/> 
     24                <CobraFiles Include="source\B.cobra"/> 
     25                <CobraFiles Include="source\C.cobra"/> 
     26 
     27                <References Include="System"/> 
     28                <References Include="System.Web"/> 
     29 
     30        </ItemGroup> 
     31 
     32        <Target Name="Clean"> 
     33                <RemoveDir Directories="$(OutputDir)"/> 
     34        </Target> 
     35 
     36        <Target Name="Build"> 
     37                <CallTarget Targets="Reset"/> 
     38                <Exec Command="cobra -c -t:lib @(CobraFlags, ' ') -out:$(OutputDir)/$(ProjectName).dll @(References -> '-ref:%(Identity)', ' ') @(CobraFiles, ' ')"/> 
     39        </Target> 
     40 
     41        <Target Name="Test"> 
     42                <CallTarget Targets="Reset"/> 
     43                <Exec Command="cobra -test @(CobraFlags, ' ') -out:$(OutputDir)/$(ProjectName).dll @(References -> '-ref:%(Identity)', ' ') @(CobraFiles, ' ')"/> 
     44        </Target> 
     45 
     46        <Target Name="Reset"> 
     47                <CallTarget Targets="Clean"/> 
     48                <MakeDir Condition="!Exists('$(OutputDir)')" Directories="$(OutputDir)"/> 
     49        </Target> 
    1350 
    1451</Project> 
     
    4986 * [http://www.sedodream.com/PermaLink,guid,ed3a0c98-fdac-4467-9116-5b3bf6755abc.aspx How to Build Several Projects] 
    5087 * [http://stackoverflow.com/questions/3008927/ How to separate items with a space rather than semicolon] 
     88 
     89== See Also == 
     90 
     91 * CommandLine