Skip to content

Commit fe85fc6

Browse files
committed
#546 Try workaround from MSFT issue
1 parent 2219485 commit fe85fc6

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Damselfly.ML.FaceONNX/Damselfly.ML.FaceONNX.csproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,26 @@
1717
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed"/>
1818
<PackageReference Include="SixLabors.ImageSharp"/>
1919
</ItemGroup>
20+
21+
<PropertyGroup>
22+
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
23+
</PropertyGroup>
24+
25+
<!-- Remove once ONNX team fix the bug -->
26+
<Target Name="CustomAfterBuild" AfterTargets="AfterBuild" Condition="('$(IsWindows)'!='true')">
27+
<Message Importance="High" Text="Delete unnecessary onnx dlls" />
28+
<ItemGroup>
29+
<FilesToDeleteInBuild Include="$(TargetDir)onnxruntime*.dll"/>
30+
</ItemGroup>
31+
<Delete Files="@(FilesToDeleteInBuild)" />
32+
</Target>
33+
34+
<!-- Remove once ONNX team fix the bug -->
35+
<Target Name="CustomAfterPublish" AfterTargets="AfterPublish" Condition="('$(IsWindows)'!='true')">
36+
<Message Importance="High" Text="Delete unnecessary onnx dlls" />
37+
<ItemGroup>
38+
<FilesToDeleteInPublish Include="$(PublishDir)onnxruntime*.dll"/>
39+
</ItemGroup>
40+
<Delete Files="@(FilesToDeleteInPublish)" />
41+
</Target>
2042
</Project>

Damselfly.ML.ObjectDetection.ML/Damselfly.ML.ObjectDetection.csproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,26 @@
3232
<ItemGroup>
3333
<ProjectReference Include="..\Damselfly.Core.Utils\Damselfly.Core.Utils.csproj"/>
3434
</ItemGroup>
35+
36+
<PropertyGroup>
37+
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
38+
</PropertyGroup>
39+
40+
<!-- Remove once ONNX team fix the bug -->
41+
<Target Name="CustomAfterBuild" AfterTargets="AfterBuild" Condition="('$(IsWindows)'!='true')">
42+
<Message Importance="High" Text="Delete unnecessary onnx dlls" />
43+
<ItemGroup>
44+
<FilesToDeleteInBuild Include="$(TargetDir)onnxruntime*.dll"/>
45+
</ItemGroup>
46+
<Delete Files="@(FilesToDeleteInBuild)" />
47+
</Target>
48+
49+
<!-- Remove once ONNX team fix the bug -->
50+
<Target Name="CustomAfterPublish" AfterTargets="AfterPublish" Condition="('$(IsWindows)'!='true')">
51+
<Message Importance="High" Text="Delete unnecessary onnx dlls" />
52+
<ItemGroup>
53+
<FilesToDeleteInPublish Include="$(PublishDir)onnxruntime*.dll"/>
54+
</ItemGroup>
55+
<Delete Files="@(FilesToDeleteInPublish)" />
56+
</Target>
3557
</Project>

0 commit comments

Comments
 (0)