UnityLinker.exe fails when building UWP app on specific machine

Hi, I'm trying to build a Unity UWP IL2CPP app on a specific machine, but I get the "UnityLinker.exe did not run properly" error when building on it, even with a completely empty project. I can build Unity UWP apps on other machines just fine with the same version of Unity, so I assume there's something special about this machine or the software it has installed. The only differences I'm aware of is that the machine that gets the error is Enterprise instead of Professional, and I don't have admin rights.

The error seems to come from ExtensionModule.cs, which I've only seen a few other users have issues with.

Any help would be appreciated. Thanks!

Windows edition: Windows 10 Enterprise
Unity versions attempted: 2019.4.0f1 (Personal), 2019.3.4f1 (Personal)
Latest Windows 10 SDK version installed: 10.0.19041.1
Latest version of .NET framework installed: 4.8.03761
Visual Studio 2019 version: 16.8.2

Error:
[quote]
Exception: C:\Program Files\Unity\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at :0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable
1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at :0)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action
1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0)
PostProcessWinRT.RunIL2CPPForProjectBuild () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1874)
PostProcessWinRT.RunIL2CPP () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1845)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:214)
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:85)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:89)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
[/quote]

Can you post the full editor log? Looks like you managed to emit the important part of the failure :).

Hi, sorry, I guess I must've missed the other error. Either that, or one of the errors was missing in my non-test project. Either way, here's all the errors:

Error 1:
[quote]
Failed running C:\Program Files\Unity\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe -out=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/tempStrip -x=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/TypesInScenes.xml -d=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed --include-unity-root-assembly=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/I18N.CJK.dll --include-unity-root-assembly=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/I18N.dll --include-unity-root-assembly=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/I18N.MidEast.dll --include-unity-root-assembly=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/I18N.Other.dll --include-unity-root-assembly=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/I18N.Rare.dll --include-unity-root-assembly=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/I18N.West.dll --dotnetruntime=il2cpp --dotnetprofile=unityaot --use-editor-options --include-directory=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed --editor-settings-flag=Development --rule-set=Conservative --editor-data-file=C:/Users/anthony.e.caruso/Documents/Workspaces/TestUWP/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --platform=WinRT --engine-modules-asset-file="C:/Program Files/Unity/Editor/Data/PlaybackEngines/MetroSupport/Whitelists/../modules.asset"
stdout:
Fatal error in Unity CIL Linker
System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.SHA1Managed..ctor()
at Mono.Cecil.CryptoService.ComputeHash(ByteBuffer[ ] buffers)
at Mono.Cecil.MetadataBuilder.ComputeDeterministicMvid()
at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable1 stream, WriterParameters parameters)
at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable
1 stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
at Mono.Linker.Steps.OutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
at Unity.Linker.Steps.UnityOutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
at Mono.Linker.Steps.OutputStep.OutputAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.Run()
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
at Unity.Linker.UnityDriver.RunDriver()
stderr:
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable
1, String&, String&, String, String)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String&, String&, IEnumerable1, UnityLinkerRunInformation)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(UnityLinkerRunInformation)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, BaseUnityLinkerPlatformProvider, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel)
UnityEditorInternal.IL2CPPBuilder:Run()
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action
1, RuntimeClassRegistry)
PostProcessWinRT:RunIL2CPPForProjectBuild() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1874)
PostProcessWinRT:RunIL2CPP() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1845)
PostProcessWinRT:process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:214)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
[/quote]

Error 2:
[quote]
Exception: C:\Program Files\Unity\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at :0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable
1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at :0)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action
1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0)
PostProcessWinRT.RunIL2CPPForProjectBuild () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1874)
PostProcessWinRT.RunIL2CPP () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1845)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:214)
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:85)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:89)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
[/quote]

Error 3:
[quote]
Build completed with a result of 'Failed' in 35 seconds (35439 ms)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
[/quote]

Error 4:
[quote]
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in :0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
[/quote]

Actually, looking through Error 1, I realized it has to do with FIPS, and I looked up other threads about it (like https://discussions.unity.com/t/662722 ). It turns out that on the machine that errors, the FipsAlgorithmPolicy (at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy) is enabled. It's disabled on the machine that works, and if I enable it on that machine, I get the same error. So I'll see if I can get this disabled on the machine that's erroring. Thanks for making me aware that I was missing the most important part of the error log! :smile:

1 Like