Skip to content

Commit

Permalink
Fix specific platform target names
Browse files Browse the repository at this point in the history
Multiple targets cannot exist with the same name. To allow all targets to exist simultaneously, they must have unique names.

This was preventing the specific platform targets from executing.

Signed-off-by: timyhac <timyhac@gmail.com>
  • Loading branch information
timyhac authored Jul 17, 2024
1 parent a4a6a1f commit 68a74e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libplctag.NativeImport/libplctag.NativeImport.targets
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

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

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

<Target Name="LibplctagNetFrameworkTarget" AfterTargets="Build" Condition=" ('$(TargetFrameworkIdentifier)' == '.NETFramework') AND ('$(Platform)' == 'AnyCPU') ">
<Target Name="LibplctagNetFrameworkTarget_AnyCPU" 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>
Expand Down

0 comments on commit 68a74e3

Please sign in to comment.