ソースを参照

Migrated target '_CopyGeneratedSource'

ArnoldZokas 15 年 前
コミット
01d20fc6e6
2 ファイル変更36 行追加1 行削除
  1. 5 1
      build/Common.targets
  2. 31 0
      build/build.csproj

+ 5 - 1
build/Common.targets

@@ -21,7 +21,11 @@
 		<Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
 	</Target>
 
-	<Target Name="_Test" DependsOnTargets="_GenerateSource">
+	<Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
+		<Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
+	</Target>
+
+	<Target Name="_Test" DependsOnTargets="_CopyGeneratedSource">
 		<Exec Command="&quot;E:\dotnet-protobufs\lib\NUnit 2.2.8.0\nunit-console.exe&quot; %(TestContainer.Identity) /xml:$(BuildOutputDirectory)\%(TestContainer.Filename).$(BuildConfiguration).xml" />
 	</Target>
 

+ 31 - 0
build/build.csproj

@@ -37,6 +37,37 @@
 		<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_optimize_for.proto" />
 		<Protos Include="$(ProtosDirectory)\tutorial\addressbook.proto" />
 		
+		<GeneratedSource Include="$(BuildTempDirectory)\CSharpOptions.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\DescriptorProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestMessageSetProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestOptimizeForProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\AddressBookProtos.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestCSharpOptionsProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestCustomOptionsProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		<GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportProtoFile.cs">
+			<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+		</GeneratedSource>
+		
 		<TestContainer Include="$(ProjectDirectory)\src\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll" />
 		<TestContainer Include="$(ProjectDirectory)\src\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll" />
 	</ItemGroup>