Skip to content

Commit

Permalink
Delete native binary files on Clean (#426)
Browse files Browse the repository at this point in the history
Signed-off-by: timyhac <[email protected]>
  • Loading branch information
timyhac authored Dec 1, 2024
1 parent e28ec36 commit e2b2d28
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/libplctag.NativeImport/libplctag.NativeImport.targets
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="LibplctagNetFrameworkTarget_x86" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'x86') ">
<Target Name="LibplctagNetFrameworkTarget_x86_Build" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'x86') ">
<Copy SourceFiles="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\plctag.dll" DestinationFolder="$(OutDir)" />
</Target>

<Target Name="LibplctagNetFrameworkTarget_x64" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'x64') ">
<Target Name="LibplctagNetFrameworkTarget_x64_Build" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'x64') ">
<Copy SourceFiles="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\plctag.dll" DestinationFolder="$(OutDir)" />
</Target>

<Target Name="LibplctagNetFrameworkTarget_AnyCPU" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'AnyCPU') ">
<Target Name="LibplctagNetFrameworkTarget_AnyCPU_Build" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'AnyCPU') ">
<Copy SourceFiles="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\plctag.dll" DestinationFolder="$(OutDir)X86\" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\plctag.dll" DestinationFolder="$(OutDir)X64\" />
</Target>

<Target Name="LibplctagNetFrameworkTarget_x86_Clean" AfterTargets="Clean" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'x86') ">
<Delete Files="$(OutDir)\plctag.dll" />
</Target>

<Target Name="LibplctagNetFrameworkTarget_x64_Clean" AfterTargets="Clean" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'x64') ">
<Delete Files="$(OutDir)\plctag.dll" />
</Target>

<Target Name="LibplctagNetFrameworkTarget_AnyCPU_Clean" AfterTargets="Clean" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'AnyCPU') ">
<Delete Files="$(OutDir)X86\plctag.dll" />
<Delete Files="$(OutDir)X64\plctag.dll" />
</Target>

</Project>

0 comments on commit e2b2d28

Please sign in to comment.