Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

138 lines (113 sloc) 5.357 kb
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Build\MSBuild.Community.Tasks.Targets" />
<PropertyGroup>
<Major>1</Major>
<Minor>4</Minor>
<Build>0</Build>
<Revision>0</Revision>
<BindMinor>4</BindMinor>
<BindBuild>0</BindBuild>
<BindRevision>0</BindRevision>
</PropertyGroup>
<PropertyGroup Condition=" '$(BUILD_NUMBER)' != '' ">
<!-- TeamCity Build Number -->
<Revision>$(BUILD_NUMBER)</Revision>
</PropertyGroup>
<ItemGroup>
<DefaultExclude Include="**\.git\**" />
<DefaultExclude Include="**\.git*" />
<DefaultExclude Include="**\bin\**" />
<DefaultExclude Include="**\Bootstrap\**" />
<DefaultExclude Include="**\obj\**" />
<DefaultExclude Include="**\Release\**" />
<DefaultExclude Include="**\Debug\**" />
<DefaultExclude Include="**\packages\**" />
<DefaultExclude Include="**\Test\**" />
<DefaultExclude Include="**\TestResults\**" />
<DefaultExclude Include="**\doc\**" />
<DefaultExclude Include="**\*.user" />
<DefaultExclude Include="**\*.suo" />
<DefaultExclude Include="**\*.patch" />
<DefaultExclude Include="**\*.resharper" />
<DefaultExclude Include="**\*.cache" />
<DefaultExclude Include="**\_ReSharper*\**" />
<DefaultExclude Include="*.teamcity*" />
<DefaultExclude Include="*.zip" />
</ItemGroup>
<Target Name="VerifyCalledFromMaster">
<Error Text="Do not execute $(MSBuildProjectFile) directly. Build Master.proj instead."
Condition="'$(CalledFromMaster)'!='true'" />
</Target>
<Target Name="Initialize" DependsOnTargets="VerifyCalledFromMaster">
<Message Text="Beginning Build." />
</Target>
<Target Name="Version" DependsOnTargets="Initialize">
<GitVersion LocalPath="$(MSBuildProjectDirectory)">
<Output TaskParameter="CommitHash" PropertyName="CommitHash" />
</GitVersion>
<Message Text="Version: $(Major).$(Minor).$(Build).$(Revision)"/>
<Message Text="Commit Hash: $(CommitHash)"/>
<Time>
<Output TaskParameter="Month" PropertyName="Month" />
<Output TaskParameter="Day" PropertyName="Day" />
<Output TaskParameter="Year" PropertyName="Year" />
</Time>
<AssemblyInfo CodeLanguage="CS"
OutputFile="Source\GlobalAssemblyInfo.cs"
GenerateClass="true"
AssemblyCompany="https://github.com/loresoft/msbuildtasks/"
AssemblyProduct="MSBuild.Community.Tasks"
AssemblyCopyright="Copyright © $(Year) MSBuild Community Tasks Project"
AssemblyConfiguration="Commit $(CommitHash)"
ComVisible="false"
CLSCompliant="false"
AssemblyVersion="$(Major).$(Minor).$(Build).$(Revision)"
AssemblyFileVersion="$(Major).$(Minor).$(Build).$(Revision)"
AssemblyInformationalVersion="$(Major).$(Minor).$(Build).$(Revision)" />
</Target>
<Target Name="Compile" DependsOnTargets="Version">
<MSBuild Projects="Source\MSBuild.Community.Tasks.sln"
Properties="Configuration=Release" />
</Target>
<Target Name="Merge" DependsOnTargets="Compile">
<Copy SourceFiles="Build\MSBuild.Community.Tasks.dll"
DestinationFiles="Build\MSBuild.Temp.dll" />
<!-- Merge together files -->
<ILMerge InputAssemblies="Build\MSBuild.Temp.dll;Build\Ionic.Zip.Reduced.dll"
Internalize="true"
OutputFile="Build\MSBuild.Community.Tasks.dll"
KeyFile="Source\MSBuild.Community.Tasks\MSBuild.Community.Tasks.snk" />
<!-- Cleanup unneed files -->
<CreateItem Include="Build\*.dll;Build\*.x*l" Exclude="Build\MSBuild.Community.Tasks.*" >
<Output TaskParameter="Include" ItemName="PurgeBuildFiles" />
</CreateItem>
<Delete Files="@(PurgeBuildFiles)" />
</Target>
<Target Name="Documentation" DependsOnTargets="Compile">
<TaskSchema Assemblies="Build\MSBuild.Community.Tasks.dll"
OutputPath="Build"
CreateTaskList="false"
IgnoreMsBuildSchema="true"
Includes="Microsoft.Build.Commontypes.xsd"/>
</Target>
<Target Name="Zip" DependsOnTargets="Documentation;Merge">
<CreateItem Include="**\*.*" Exclude="@(DefaultExclude)" >
<Output TaskParameter="Include" ItemName="ZipFiles" />
</CreateItem>
<Zip Files="@(ZipFiles)"
ZipFileName="MSBuild.Community.Tasks.v$(Major).$(Minor).$(Build).$(Revision).zip" />
</Target>
<Target Name="Installer" DependsOnTargets="Compile;Documentation;Merge">
<MSBuild Projects="Source\MSBuild.Community.Tasks.Setup\MSBuildTasks.wixproj"
Properties="Configuration=Release;Major=$(Major);Minor=$(Minor);Build=$(Build);Revision=$(Revision)" />
<Copy SourceFiles="Source\MSBuild.Community.Tasks.Setup\bin\Release\MSBuild.Community.Tasks.msi"
DestinationFiles="MSBuild.Community.Tasks.v$(Major).$(Minor).$(Build).$(Revision).msi" />
</Target>
<Target Name="Build" DependsOnTargets="Zip;Installer">
<Message Text="Build Complete"/>
</Target>
<Target Name="Nightly" DependsOnTargets="Build">
<Message Text="Build Committed Revision: $(Revision)" />
</Target>
</Project>
Jump to Line
Something went wrong with that request. Please try again.