|
@@ -34,17 +34,12 @@
|
|
|
|
|
|
<Target Name="InstallProtogen" BeforeTargets="GenerateProtoContracts"
|
|
|
Condition="'$(ProtogenExists)' != 'true'">
|
|
|
- <Message Text="Downloading protogen v$(ProtogenVersion)..." Importance="high"/>
|
|
|
- <Exec Command="dotnet tool install --local protobuf-net.Protogen --version $(ProtogenVersion)"/>
|
|
|
- <PropertyGroup>
|
|
|
- <ProtogenExists>true</ProtogenExists>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <Message Text="protogen installed successfully." Importance="high"/>
|
|
|
+ <Message Text="protogen is not installed. Skipping generating contracts" Importance="high"/>
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
<Target Name="GenerateProtoContracts" BeforeTargets="BeforeCompile"
|
|
|
+ Condition="'$(ProtogenExists)' == 'true'">
|
|
|
Inputs="$(MSBuildProjectDirectory)\DataContracts\*.proto"
|
|
|
Outputs="$(MSBuildProjectDirectory)\ProtoAutogen\*.cs">
|
|
|
<Exec Command="dotnet tool run protogen --csharp_out=ProtoAutogen --proto_path=DataContracts +listset=yes *.proto"/>
|