Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install 64bit dependencies #113

Open
ghidosoft opened this issue May 10, 2017 · 4 comments
Open

Cannot install 64bit dependencies #113

ghidosoft opened this issue May 10, 2017 · 4 comments

Comments

@ghidosoft
Copy link

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.

@fls-eugene
Copy link

Getting same results from nugget.

@JibbSmart
Copy link

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.

@wstaelens
Copy link

same problem.... 😞

@s2quake
Copy link

s2quake commented Mar 15, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants