23 lines
1.1 KiB
XML
23 lines
1.1 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<!-- Set default values for proto generation -->
|
|
<GenerateProtoFile Condition="'$(GenerateProtoFile)' == ''">true</GenerateProtoFile>
|
|
<ProtoOutputDirectory Condition="'$(ProtoOutputDirectory)' == ''">$(MSBuildProjectDirectory)\Protos</ProtoOutputDirectory>
|
|
<GeneratedProtoFileName Condition="'$(GeneratedProtoFileName)' == ''">cqrs_services.proto</GeneratedProtoFileName>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="SvrntyGenerateProtoInfo" BeforeTargets="CoreCompile">
|
|
<Message Text="Svrnty.CQRS.Grpc.Generators: Proto file will be auto-generated to $(ProtoOutputDirectory)\$(GeneratedProtoFileName)" Importance="normal" />
|
|
</Target>
|
|
|
|
<!-- This target ensures the Protos directory exists before the generator runs -->
|
|
<Target Name="EnsureProtosDirectory" BeforeTargets="CoreCompile">
|
|
<MakeDir Directories="$(ProtoOutputDirectory)" Condition="!Exists('$(ProtoOutputDirectory)')" />
|
|
</Target>
|
|
|
|
<!-- Set environment variable so the source generator can find the project directory -->
|
|
<PropertyGroup>
|
|
<MSBuildProjectDirectory>$(MSBuildProjectDirectory)</MSBuildProjectDirectory>
|
|
</PropertyGroup>
|
|
</Project>
|