WmfMedia don't let me to package my game

Hey guys!

I have an issue packing my game it always end up with error at the same point.

Tested on:

  • UE 4.19
  • UE 4.18

The error says:

UATHelper: Packaging (Windows (64-bit)):   ERROR: UBT ERROR: Failed to produce item: C:\UnrealEngine-4.18\Engine\Plugins\Media\WmfMedia\Binaries\Win64\UE4-WmfMedia.lib
UATHelper: Packaging (Windows (64-bit)):   Total build time: 1662.75 seconds (Local executor: 0.00 seconds)
UATHelper: Packaging (Windows (64-bit)): Took 1663.0043994s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): ERROR: Command failed (Result:5): C:\UnrealEngine-4.18\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Win64 Development  -NoUBTMakefiles  -remoteini="C:\Users\grzes\Documents\Unreal Projects\test" -skipdeploy -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2018.05.17-13.29.35.txt' 
UATHelper: Packaging (Windows (64-bit)):        (see C:\UnrealEngine-4.18\Engine\Programs\AutomationTool\Saved\Logs\UAT_Log.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

This have been tested on a clean TopDown project without any changes made.

What I did exactly:

  1. Create new project based on TopDown template
  2. Change package settings to include TopDown map (only this config array was changed nothing else)
  3. Run package for Win64

Both UE engines were source build.

Please help me out here I am stuck real hard.

What I found so far is that the problem (at least for me) occur only when using Visual Studio 2017. And I’d need to point out that I used GenerateProjectFiles.bat with flag -2017 when building UE4 source code.

I’ve got the same problem, do you have a solution?

ERROR: UBT ERROR: Failed to produce item: C:\Unreal\UnrealEngine-release\Engine\Plugins\Media\WmfMedia\Binaries\Win64\CleanThirdPersonClient-WmfMedia.lib

Can reproduce the same error on 4.19.2 with VS2017 15.7.2.
Ok rebuilding the engine with VS2015 and rebuiding the project with VS2015 it succeeds. Also a friend of mine using an older version of VS2017 was able to build, so it this error looks version related … would be rly happy if someone has a fix for this.

OK guys I found 2 threads on Unreal Engine Issue site that seem to be the same problem as we have. Please vote on them so the UE4 crew know that its kinda important issue.

I got the same error on 4.18.3 with VS2017 15.7.2:

3>ERROR : UBT error : Failed to produce item: D:\UnrealEngine\Engine\Plugins\Media\WmfMedia\Binaries\Win64\UE4-WmfMedia.lib

3>Total build time: 5.42 seconds (Local executor: 0.00 seconds)

3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command “…..\Build\BatchFiles\Build.bat UE4Game Win64 DebugGame -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.

3>Done building project “UE4.vcxproj” – FAILED.

This only happens if I build with “DebugGame” configuration. When I used “Debug Editor” configuration, it works fine.

I’ve tried to clean and rebuild it for many times, but no luck.

Any solution?

Use VS2015 and wait for a fix, so vote for the linked issues.

OK guys, I downloaded the engine from github , version 4.20 and successfully packaged a blank project, had one additional error though : Cannot build project (UBT ERROR) - Platform & Builds - Unreal Engine Forums
All I needed to do to fix that, was to delete created earlier binaries and built them again, after this, project packaged successfully.

If you ever have trouble with this in the future and aren’t explicitly using the WMF Media Player plugin in your game, from the main menu go to Edit->Plugins then select the Media Players section on the left and uncheck the Enabled box for the plugin.

It seems there was a bug introduced in 4.19 that is causing issues for some people, so it’s good to hear 4.20 has fixed the issue.

I got the same error as well!

[458/464] Link Krieg-OculusInput.lib
[459/464] Link Krieg-ExampleDeviceProfileSelector.lib
[460/464] Link Krieg-CharacterAI.lib
[461/464] Link Krieg-RuntimePhysXCooking.lib
[462/464] Link Krieg-WindowsMoviePlayer.lib
ERROR: UBT ERROR: Failed to produce item: D:\UnrealEngineSource\Engine\Plugins\Media\WmfMedia\Binaries\Win64\Krieg-WmfMedia.lib
Total build time: 1293.23 seconds (Local executor: 0.00 seconds)

My guess is there is an issue loading the Windows Media File plugin when using Visual Studio 2017. As you can see from the 4.20 changelog for Unreal Engine, Visual Studio 2017 is now officially the default VS version for projects:

Core Updates:
Visual Studio 2017. UE4 will now use the Visual Studio 2017 compiler, and generate project files for Visual Studio
2017 by default. We’ve also added support for the Windows 10 SDK.

Anyone affected by this, could you try and see if the change from https://github.com/EpicGames/UnrealEngine/commit/3618d96b476b32d68c3d5a7ed3b90163a062da79#diff-1d6db60a63ecee034537431e85198c73 helps for this? I looked at 4.20 changes on WmfMedia and that was only thing that looked related to this. I tried to repro the build error with few VS2017 without success (my 4.19.2 builds just fine regardless) so I can’t tell if this fix helps for those who has this issue.

I just had this error when switching over to a new PC. This is an easy fix. Go to your project, in the menu, go to Edit, Plugins. Search for the WmfMedia plugin. Make sure the Enable checkbox is unchecked. Your package should build now.

Actually, searching for WmfMedia in the plugins sections doesn’t work. In the Plugins menu, scroll down to Media Players, click on it, find the WMF Media Plugin and disable it.

you can try to setup VC++2015.3 v14.00(V140)toolset desktop in the Visual Studio 2017 individual components.

This worked for me too (UE 4.19.2, latest VisualStudio). Thanks!

What if I need that plugin? It works in editor