AutomationToolLauncher can't load AutomationTool.exe

In my git build of 4.4, all of my projects are having trouble launching. AutomationToolLauncher consistently crashes, even on the sample projects.

LogPlayLevel:Display: Running AutomationTool...
LogPlayLevel:Display: Could not load file or assembly 'file:///D:\UnrealEngine\Engine\Binaries\DotNET\AutomationTool.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
LogPlayLevel:Display:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
LogPlayLevel:Display:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
LogPlayLevel:Display:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
LogPlayLevel:Display:    at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
LogPlayLevel:Display:    at System.Reflection.Assembly.LoadFrom(String assemblyFile)
LogPlayLevel:Display:    at System.AppDomain.ExecuteAssembly(String assemblyFile, String[] args)
LogPlayLevel:Display:    at System.AppDomain.ExecuteAssembly(String assemblyFile, String[] args)
LogPlayLevel:Display:    at AutomationToolLauncher.Launcher.Main() in d:\UnrealEngine\Engine\Source\Programs\AutomationToolLauncher\Launcher.cs:line 30
LogPlayLevel:Display: AutomationToolLauncher exiting with ExitCode=193

When I debug AutomationToolLauncher the inner exception is this:

An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See <loadFromRemoteSources> Element | Microsoft Learn for more information.

Also to note, my D:\ is a real hard drive, not a network share, as implied by the exception’s message wording “network location”. However Windows thinks it a network location because the file came from the zip files on the release notes from github (a network location).

The inner exception explains that by default, when an assembly is run it is put in a sandbox. So to prevent the crash a “.config” file needs to give AutomationToolLauncher.exe the permission to run AutomationTool.exe with the correct permissions.

Here is a pull request to fix the issue.

https://github.com/EpicGames/UnrealEngine/pull/371

You can fix it by hand by adding an app.config file in Engine/Source/Programs/AutomationToolLauncher/ with the following contents:

<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>

Then add the app.config file to your AutomationToolLauncher.csproj file. And rebuild AutomationToolLauncher.

Or you could simply cheat the build process and instead save the above app.config as AutomationToolLauncher.exe.config in Engine/Binaries/DotNET/

This also seems to solve these issues by giving the app permission instead of forcing the user to alter the properties on the dlls after unzipping.

https://answers.unrealengine.com/questions/84689/cant-launch-the-game-pie-is-fine.html
https://answers.unrealengine.com/questions/13553/launch-and-compile-level-error.html

The PR was accepted: https://github.com/EpicGames/UnrealEngine/commit/18f8bac5044ae8cf6badf55e1b0f78f2e91d90d4