|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
|
|
|
|
<Target Name="_Clean">
|
|
|
|
<RemoveDir Directories="@(WorkingDirectories)" Condition="Exists(%(WorkingDirectories.Identity))" />
|
|
|
|
<MakeDir Directories="@(WorkingDirectories)" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_Compile" DependsOnTargets="_Clean">
|
|
|
|
<MSBuild Projects="$(SolutionFile)" Properties="Configuration=$(BuildConfiguration)" BuildInParallel="true" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_GenerateSource">
|
|
|
|
<PropertyGroup>
|
|
|
|
<ProtosList>@(Protos)</ProtosList>
|
|
|
|
<Args>$(ProtosList.Replace(`;`,` `))</Args>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Exec Command="$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb $(Args)" WorkingDirectory="$(BuildTempDirectory)" />
|
|
|
|
<Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
|
|
|
|
<Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_CompileGeneratedSource" DependsOnTargets="_CopyGeneratedSource">
|
|
|
|
<MSBuild Projects="$(SolutionFile)" Properties="Configuration=$(BuildConfiguration)" BuildInParallel="true" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_Test" DependsOnTargets="_CompileGeneratedSource">
|
|
|
|
<Exec Command=""E:\dotnet-protobufs\lib\NUnit 2.2.8.0\nunit-console.exe" %(TestContainer.Identity) /xml:$(BuildOutputDirectory)\%(TestContainer.Filename).$(BuildConfiguration).xml" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
</Project>
|