Cannot install 64bit dependencies
I installed SharpFont using the nuget package but the deployed freetype6.dll is always 32bit. When I switch the platform of my solution to x64 I get this exception:
Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary) at SharpFont.Library..ctor() ...
Am I missing something? Thanks.
Getting same results from nugget.
I had this problem and worked around it by editing SharpFont.Dependencies.props -- the Include line references an x86 folder, and you can change it to x64 to get the right DLL. This has worked so far in development, anyway.
same problem.... 😞
I found a code to solve the problem.
<ItemGroup>
<PackageReference Include="SharpFont.Dependencies" Version="2.6.0" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup>
<Content Update="$(PkgSharpFont_Dependencies)\bin\msvc10\x86\freetype6.dll">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Include="$(PkgSharpFont_Dependencies)\bin\msvc10\x64\freetype6.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
The test environment is dotnet core 3.1.