Skip to content

Commit d49e661

Browse files
committed
Add timeout between download retries.
1 parent d937f68 commit d49e661

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
<Project>
2-
<Target Name="Downloadnativenatives" Condition="!Exists('$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native')">
3-
<MakeDir Directories="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native" />
4-
<DownloadFile
5-
DestinationFolder="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)"
6-
SourceUrl="$(libUrl)" Retries="3"
7-
DestinationFileName="native.zip"/>
8-
<Unzip DestinationFolder="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native"
9-
SourceFiles="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native.zip"/>
10-
<Delete Files="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native.zip"/>
11-
</Target>
2+
<Target Name="Downloadnativenatives" Condition="!Exists('$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native')">
3+
<PropertyGroup>
4+
<NativeZipPath>$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native.zip</NativeZipPath>
5+
</PropertyGroup>
6+
<MakeDir Directories="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native" />
7+
<Delete Files="$(NativeZipPath)"
8+
Condition="Exists('$(NativeZipPath)')"
9+
ContinueOnError="true"/>
10+
<DownloadFile
11+
DestinationFolder="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)"
12+
SourceUrl="$(libUrl)"
13+
Retries="5"
14+
RetryDelayMilliseconds="1000"
15+
DestinationFileName="native.zip"/>
16+
<Unzip DestinationFolder="$(MSBuildProjectDirectory)\obj\runtimes\$(Rid)\native"
17+
SourceFiles="$(NativeZipPath)"/>
18+
<Delete Files="$(NativeZipPath)"/>
19+
</Target>
1220
</Project>

0 commit comments

Comments
 (0)