I try to consume from nuget that contains both x86 and x64 dlls, but my project is Any CPU. The problem is that sometimes I want to take the x86 and sometimes x64. The target file looks like this:
<PropertyGroup>
<CasosesPlatform Condition="'$(Platform)' == 'x86'">x86</CasosesPlatform>
<CasosesPlatform Condition="'$(Platform)' != 'x86'">x64</CasosesPlatform>
</PropertyGroup>
<ItemGroup>
<Reference Include="Casoses">
<HintPath>$(MSBuildThisFileDirectory)..\runtimes\win-$(CasosesPlatform)\lib\$(Configuration)\Casoses.dll</HintPath>
</Reference>
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\runtimes\win-$(CasosesPlatform)\lib\$(Configuration)\Casoses.dll" />
</ItemGroup>
Now, only x86 will take x86 so Any CPU will take the x64. What am I doing wrong? is there a better way to do this?
Thanks.