build.csproj 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <PropertyGroup>
  4. <ProjectName>Protocol Buffers</ProjectName>
  5. <BuildConfiguration Condition=" '$(BuildConfiguration)' == '' ">Error</BuildConfiguration>
  6. <BuildTools Condition=" '$(BuildTools)' == '' ">4.0</BuildTools>
  7. <ForcedFrameworkVersion Condition=" '$(BuildTools)' == '3.5' ">TargetFrameworkVersion=v2.0;</ForcedFrameworkVersion>
  8. <!--Directory Paths-->
  9. <ProjectDirectory>$(MSBuildProjectDirectory)\..</ProjectDirectory>
  10. <SourceDirectory>$(ProjectDirectory)\src</SourceDirectory>
  11. <LibDirectory>$(ProjectDirectory)\lib</LibDirectory>
  12. <ProtosDirectory>$(ProjectDirectory)\protos</ProtosDirectory>
  13. <BenchmarkProtosDirectory>$(ProjectDirectory)\benchmarks</BenchmarkProtosDirectory>
  14. <BuildTempDirectory>$(ProjectDirectory)\build_temp\$(BuildConfiguration)</BuildTempDirectory>
  15. <BuildOutputDirectory>$(ProjectDirectory)\build_output\$(BuildConfiguration)</BuildOutputDirectory>
  16. <PackageName Condition=" '$(PackageName)' == '' ">$(BuildConfiguration)</PackageName>
  17. <!--File Paths-->
  18. <SolutionFile Condition=" '$(BuildTools)' == '4.0' ">$(SourceDirectory)\ProtocolBuffers.sln</SolutionFile>
  19. <SolutionFile Condition=" '$(BuildTools)' == '3.5' ">$(SourceDirectory)\ProtocolBuffers2008.sln</SolutionFile>
  20. <!--Tool Paths-->
  21. <ProtocExePath>$(LibDirectory)\protoc.exe</ProtocExePath>
  22. <ProtogenExePath>$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\protogen.exe</ProtogenExePath>
  23. <ProtoBenchExePath>$(BuildTempDirectory)\ProtoBench.exe</ProtoBenchExePath>
  24. <NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
  25. <ZipExePath>$(LibDirectory)\7-Zip 9.20\7za.exe</ZipExePath>
  26. </PropertyGroup>
  27. <Import Project="Common.targets"/>
  28. <ItemGroup>
  29. <WorkingDirectories Include="$(BuildTempDirectory)" />
  30. <WorkingDirectories Include="$(BuildOutputDirectory)" />
  31. <Protos Include="$(ProtosDirectory)\extest\unittest_issues.proto" />
  32. <Protos Include="$(ProtosDirectory)\extest\unittest_extras.proto" />
  33. <Protos Include="$(ProtosDirectory)\extest\unittest_extras_full.proto" />
  34. <Protos Include="$(ProtosDirectory)\extest\unittest_extras_lite.proto" />
  35. <Protos Include="$(ProtosDirectory)\extest\unittest_extras_xmltest.proto" />
  36. <Protos Include="$(ProtosDirectory)\extest\unittest_generic_services.proto" />
  37. <Protos Include="$(ProtosDirectory)\extest\unittest_rpc_interop.proto" />
  38. <Protos Include="$(ProtosDirectory)\google\protobuf\descriptor.proto" />
  39. <Protos Include="$(ProtosDirectory)\google\protobuf\csharp_options.proto" />
  40. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest.proto" />
  41. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_csharp_options.proto" />
  42. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_custom_options.proto" />
  43. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_embed_optimize_for.proto" />
  44. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_empty.proto" />
  45. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_import.proto" />
  46. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_import_lite.proto" />
  47. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_lite.proto" />
  48. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_lite_imports_nonlite.proto" />
  49. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_mset.proto" />
  50. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_no_generic_services.proto" />
  51. <Protos Include="$(ProtosDirectory)\google\protobuf\unittest_optimize_for.proto" />
  52. <Protos Include="$(ProtosDirectory)\google\test\google_size.proto" />
  53. <Protos Include="$(ProtosDirectory)\google\test\google_speed.proto" />
  54. <!-- Main protos -->
  55. <GeneratedSource Include="$(BuildTempDirectory)\CSharpOptions.cs">
  56. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
  57. </GeneratedSource>
  58. <GeneratedSource Include="$(BuildTempDirectory)\DescriptorProtoFile.cs">
  59. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
  60. </GeneratedSource>
  61. <!-- Address book sample -->
  62. <GeneratedSource Include="$(BuildTempDirectory)\AddressBookProtos.cs">
  63. <TargetDirectory>$(SourceDirectory)\AddressBook</TargetDirectory>
  64. </GeneratedSource>
  65. <!-- Unit test -->
  66. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasProtoFile.cs">
  67. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  68. </GeneratedSource>
  69. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasIssuesProtoFile.cs">
  70. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  71. </GeneratedSource>
  72. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestXmlSerializerTestProtoFile.cs">
  73. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  74. </GeneratedSource>
  75. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestCSharpOptionsProtoFile.cs">
  76. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  77. </GeneratedSource>
  78. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestCustomOptionsProtoFile.cs">
  79. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  80. </GeneratedSource>
  81. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs">
  82. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  83. </GeneratedSource>
  84. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestEmptyProtoFile.cs">
  85. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  86. </GeneratedSource>
  87. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportLiteProtoFile.cs">
  88. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  89. </GeneratedSource>
  90. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportProtoFile.cs">
  91. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  92. </GeneratedSource>
  93. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestMessageSetProtoFile.cs">
  94. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  95. </GeneratedSource>
  96. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestNoGenericServicesProtoFile.cs">
  97. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  98. </GeneratedSource>
  99. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestOptimizeForProtoFile.cs">
  100. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  101. </GeneratedSource>
  102. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestProtoFile.cs">
  103. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  104. </GeneratedSource>
  105. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestRpcInterop.cs">
  106. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  107. </GeneratedSource>
  108. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGenericServices.cs">
  109. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  110. </GeneratedSource>
  111. <!-- Lite unit test -->
  112. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasFullProtoFile.cs">
  113. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  114. </GeneratedSource>
  115. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasLiteProtoFile.cs">
  116. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  117. </GeneratedSource>
  118. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportLiteProtoFile.cs">
  119. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  120. </GeneratedSource>
  121. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportProtoFile.cs">
  122. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  123. </GeneratedSource>
  124. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestLiteImportNonLiteProtoFile.cs">
  125. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  126. </GeneratedSource>
  127. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestLiteProtoFile.cs">
  128. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  129. </GeneratedSource>
  130. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestProtoFile.cs">
  131. <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
  132. </GeneratedSource>
  133. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGoogleSizeProtoFile.cs">
  134. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  135. </GeneratedSource>
  136. <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGoogleSpeedProtoFile.cs">
  137. <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
  138. </GeneratedSource>
  139. <TestContainer Include="$(SourceDirectory)\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll" />
  140. <TestContainer Include="$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffersLite.Test.dll" />
  141. <TestContainer Include="$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffersMixedLite.Test.dll" />
  142. <TestContainer Include="$(SourceDirectory)\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll" />
  143. <DynamicPackageItem Include="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.*" />
  144. <DynamicPackageItem Include="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffersLite.*" />
  145. <DynamicPackageItem Include="$(SourceDirectory)\ProtocolBuffers.Serialization\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Serialization.*" />
  146. <DynamicPackageItem Include="$(SourceDirectory)\ProtocolBuffers.Serialization\bin\$(BuildConfiguration)\Google.ProtocolBuffersLite.Serialization.*" />
  147. <DynamicPackageItem Include="$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\ProtoGen.*" />
  148. <DynamicPackageItem Include="$(SourceDirectory)\ProtoMunge\bin\$(BuildConfiguration)\ProtoMunge.*" />
  149. <DynamicPackageItem Include="$(SourceDirectory)\ProtoDump\bin\$(BuildConfiguration)\ProtoDump.*" />
  150. <DynamicPackageItem Include="$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.*" />
  151. <StaticPackageItem Include="$(ProjectDirectory)\CHANGES.txt" />
  152. <StaticPackageItem Include="$(ProjectDirectory)\license.txt" />
  153. <StaticPackageItem Include="$(ProjectDirectory)\protos\**\*.*">
  154. <TargetDirectory>\protos</TargetDirectory>
  155. </StaticPackageItem>
  156. <StaticPackageItem Include="$(LibDirectory)\Protoc*">
  157. <TargetDirectory>\Protoc</TargetDirectory>
  158. </StaticPackageItem>
  159. </ItemGroup>
  160. <!-- targets -->
  161. <Target Name="Clean" DependsOnTargets="_Clean" />
  162. <Target Name="Build" DependsOnTargets="_Compile;_Test" />
  163. <Target Name="Test" DependsOnTargets="_RunTests" />
  164. <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
  165. <Target Name="GenerateSource" DependsOnTargets="_GenerateSource;_CopyGeneratedSource" />
  166. <Target Name="BuildPackage" DependsOnTargets="PrepareOutputDirectory;PreparePackageComponent;GeneratePackage" />
  167. <Target Name="PrepareOutputDirectory" DependsOnTargets="_CleanOutputDirectory" />
  168. <Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" />
  169. <Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" />
  170. <Target Name="RunBenchmarks" DependsOnTargets="_RunBenchmarks" />
  171. </Project>