Skip to content

Commit c482203

Browse files
committed
A slightly better incremental build
1 parent 3ab2805 commit c482203

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

UiPath.Web.Client/UiPath.Web.Client.csproj

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,11 @@
6464
<Reference Include="System.Net.Http" />
6565
<Reference Include="System.Xml" />
6666
</ItemGroup>
67-
<ItemGroup>
68-
<AutoRestGenerated Include="generated\*.cs;generated\Models\*.cs"/>
69-
</ItemGroup>
7067
<ItemGroup>
7168
<Compile Include="Properties\AssemblyInfo.cs" />
7269
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
7370
<Link>Properties\GlobalAssemblyInfo.cs</Link>
7471
</Compile>
75-
<Compile Include="@(AutoRestGenerated)">
76-
<AutoGen>True</AutoGen>
77-
<Visible>False</Visible>
78-
</Compile>
7972
</ItemGroup>
8073
<ItemGroup>
8174
<None Include="app.config" />
@@ -100,11 +93,20 @@
10093
SourceFiles="$(UiPathSwaggerIntermediateLocation)\UiPath.swagger"
10194
DestinationFolder="Swagger\" Condition="$(ErrorCode)!=0"/>
10295
</Target>
103-
<Target Name="GenerateUiPathSwaggerClient" BeforeTargets="BeforeBuild;BeforeRebuild"
96+
<Target Name="GenerateUiPathSwaggerClient"
97+
DependsOnTargets="DownloadSwagger"
98+
BeforeTargets="CoreCompile"
10499
Inputs="Swagger\UiPath.swagger"
105-
Outputs="@(AutoRestGenerated)">
106-
<Exec
107-
Command="autorest --input-file=Swagger\UiPath.swagger --csharp --csharp.namespace=UiPath.Web.Client --add-credentials"
108-
Outputs="@(AutoRestGenerated)"/>
100+
Outputs="generated\UiPathWebApi.cs">
101+
<Exec
102+
Command="autorest --input-file=Swagger\UiPath.swagger --csharp --csharp.namespace=UiPath.Web.Client --add-credentials"/>
103+
<ItemGroup>
104+
<AutoRestGenerated Include="generated\*.cs;generated\Models\*.cs"/>
105+
<Compile Include="@(AutoRestGenerated)">
106+
<AutoGen>True</AutoGen>
107+
<Visible>False</Visible>
108+
</Compile>
109+
<FileWrites Include="@(AutoRestGenerated)"/>
110+
</ItemGroup>
109111
</Target>
110112
</Project>

0 commit comments

Comments
 (0)