[Solved]Content pipeline suddenly doesn't work right - can't find FreeImage DLL

The content pipeline suddenly stopped working for me today. Either that, or it stopped working earlier and I just haven’t tried using it until today, I can’t remember. But I know that before it was working, whereas now it is not.

Trying to build two .pngs and a .bmp, I get these error messages:

Build started 9/30/2015 11:58:03 PM

C:/…/Desktop/Content/Content/Content/Letters 12.png
C:/…/Desktop/Content/Content/Content/Letters 12.png: error: Importer ‘TextureImporter’ had unexpected failure!
System.DllNotFoundException: Unable to load DLL ‘FreeImage’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at FreeImageAPI.FreeImage.GetFileType(String filename, Int32 size)
at FreeImageAPI.FreeImage.LoadEx(String filename, FREE_IMAGE_LOAD_FLAGS flags, FREE_IMAGE_FORMAT& format)
at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent)C:/…/Desktop/Content/Content/Content/mouse.png
C:/…/Desktop/Content/Content/Content/mouse.png: error: Importer ‘TextureImporter’ had unexpected failure!
System.DllNotFoundException: Unable to load DLL ‘FreeImage’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at FreeImageAPI.FreeImage.GetFileType(String filename, Int32 size)
at FreeImageAPI.FreeImage.LoadEx(String filename, FREE_IMAGE_LOAD_FLAGS flags, FREE_IMAGE_FORMAT& format)
at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent)C:/…/Desktop/Content/Content/Content/Letters 12.bmp
C:/…/Desktop/Content/Content/Content/Letters 12.bmp: error: Importer ‘TextureImporter’ had unexpected failure!
System.DllNotFoundException: Unable to load DLL ‘FreeImage’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at FreeImageAPI.FreeImage.GetFileType(String filename, Int32 size)
at FreeImageAPI.FreeImage.LoadEx(String filename, FREE_IMAGE_LOAD_FLAGS flags, FREE_IMAGE_FORMAT& format)
at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent)
Build 0 succeeded, 3 failed.

Time elapsed 00:00:00.15.

Consistently, whenever I try building any image files, it gives that error about not finding the FreeImage DLL. I tried uninstalling Monogame and installing again using the latest installer, then starting a new project and using the pipeline GUI generated by it, but the same errors persisted.

A potential source of the problem might be that I just rolled back to Windows 8.1 from Windows 10. I’m pretty sure I successfully used the content pipeline on 8.1 before installing Windows 10, but who knows what rolling back has done.

Should I just try going back to Windows 10? Microsoft will hate me. This will be the third time installing it, because I can’t make up my mind.

Did you roll back to 64-bit Windows 8.1?

Is FreeImage.DLL in the same folder as Pipeline.exe and MGCB.exe?

1 Like

Yeah, it’s 64-bit Windows 8.1. As for Pipeline.exe and MGCB.exe, would those be in Visual Studio’s Program Files folder, or in one of the Project folders? Or in Monogame’s Program Files?

Edit: Found it. In MSBuild > Monogame > v3.0 > Tools, there is FreeImageNET.dll, FreeImage.dll, MGCB.exe, and Pipeline.exe.

Also, I just confirmed that building .WAV files still works. Not really surprising, I guess, it just means there’s something going wrong with the FreeImage.dll.

Well, if switching back to Windows 8.1 was what broke it, switching back again to Windows 10 didn’t fix it, which is what I just tried. The only other thing I’ve done recently that might have messed things up was change the target Net Framework for a few projects.

Edit: Okay. I installed Monogame 3.4, the stable release, and I’m using the pipeline installed by that, and now I can build images again.