Pipeline can't build - missing freetype6.dll

Hi.

So I created a Windows OpenGL project. Added a sprite, went well. All was good. Added a spritefont, and when ever I try to build now I get an error saying;

Build started 17.10.2015 00:32:33

Skipping C:/..MyProject../Content/is_it_worth_the_time.png
Skipping C:/..MyProject../Content/santa-sprite.png
C:/..MyProject../Content/font.spritefont
Building Font C:\WINDOWS\Fonts\arial.ttf
System.DllNotFoundException: Unable to load DLL 'freetype6.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary)
   at SharpFont.Library..ctor()
   at Microsoft.Xna.Framework.Content.Pipeline.Graphics.SharpFontImporter.Import(FontDescription options, String fontName)
   at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.ImportFont(FontDescription options, Single& lineSpacing, Int32& yOffsetMin, ContentProcessorContext context, String fontName)
   at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process(FontDescription input, ContentProcessorContext context)

I’ve installed the VC redist files, 2013. Control Panel list 2008, 2010, 2013 as installed.

The freetype6.dll is inside the tools folder.

I’ve tried adding zlib1.dll to the folder as it was mentioned that this was a dependency for freetype6.dll.

Any help would be great, as of now I can’t add spritefonts…

I ran into a similar problem with the FreeImage DLL. It was clearly in the same directory a MGCB.exe, but it wasn’t being found for some reason. Try downloading the stable MonoGame 3.4 release and using the pipeline installed by that instead.

I uninstalled the latest build of MonoGame, installed 3.4, copied the tools folder to a different place on my hard drive, then uninstalled 3.4 and reinstalled the latest build. Now I use the 3.4 pipeline as a standalone tool to build xnbs and just drag and drop the xnbs into my project’s debug folder.

Okey, thanks. I’ll give that a try. Forgot to mention that I’ve been using 3.4 download from the site and VS2015.

Off topic: Why aren’t more users on IRC? Only channel I found was #monogame@irc.gimp.org

Result: Same results, if I did it right. I copied it to c:\temp\MonoGame\Pipeline. Then ran;

mgcb.exe /outputDir:testBuild /build:font.spritefont

Got the same error as earlier.

Hmm. If you were already using 3.4, maybe using the latest build’s content pipeline instead would work? I know so little about MonoGame that I just have to resort to trying different things until it works. What worked for me may not work for you, unfortunately.

As for IRC, speaking for myself, I had never heard of it until you mentioned it.

Just uninstalled 3.4 and downloaded the latest development build, 3.5.x - still the same error. Even tried a reboot.

Guess I’ll have try to gather the energy needed to clone and take a look at the project :stuck_out_tongue:

Have you ever been able to build a spritefont before? If so, would there be any way to revert back to the way you were doing so before?

No, I’ve never been able to build a spritefont :confused: This is starting to get frustrating.

Wish I could help more, but I’ve never actually tried using spritefonts. If one of the devs or someone more knowledgeable sees this, they should be able to help more. In the meantime, looking at the source itself is probably your best bet.

So still stuck at this. Any tips would be really helpful.

try @trufun202 solution from here,
MonoGame Noob - Unable to load 'FreeImage'

So removed every single bit connected to MonoGame that I could find. Installed both 64bit and 32bit, cause why the fuck not. Installed MonoGame. Rebooted. Now working it seems.

Well … I watched what Pipeline.exe was doing with Sysinternals procmon, and it looks like it finds the file ok but still fails to load it. I assume it’s because the image doesn’t match the OS. corflags suggests Pipeline is AnyCPU and dumpbin suggests freetype6.dll is x64 … sheeeesh.

EDIT: ah, it has a dependency on the VC++ runtime for 2012, which isn’t shipped on Windows 10. Installing that fixes the problem.

3 Likes

Ran into the same problem. Not using Visual Studio proper but rather Visual Studio Code. The 2012 Redistributable (https://www.microsoft.com/en-us/download/details.aspx?id=30679) 64 bit version worked for me.