Browse Source

Dont auto install protogen

flabbet 2 weeks ago
parent
commit
c2eb4cb4b7

+ 2 - 7
src/PixiEditor.Extensions.CommonApi/PixiEditor.Extensions.CommonApi.csproj

@@ -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"/>