loading...

Solving "nutc_driver.exe returned exit code 1" error while building UWP app in Release mode

mhmd_azeez profile image Muhammad Azeez ・1 min read

Today my team wasted half a day because we were not able to release a new version of our UWP app. Building in debug mode worked fine both in x86 and x64. But when switching to release mode, we got this message from Visual Studio:

ILT0005: 'C:\Users\#######\.nuget\packages\runtime.win10-x86.microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\x86\ilc\Tools\nutc_driver.exe @"C:\Users\######\Source\######\obj\x86\Release\ilc\intermediate\MDIL\######.rsp      
 "'

Because the build failed several times on different computers, we thought that one of the commits since our last commit is the cause. So we began a bisecting the commits.

We narrowed down the search area to about 1 commit. But that commit only added a property to a model. We built the solution and it failed, next time we built the commit, it suceeded. We went back to the last bad commit and built it again, and it built too! So after wasting half a day, we found out the error had nothing to do with our code.

After a lot of head scratching and googling, we came across this comment GitHub issue. It suggests that the native compiler is 32 bit and runs out of memory. We added <Use64Bitcompiler>true</Use64Bitcompiler> to our project file and built the latest commit successfuly!

We added <Use64Bitcompiler>true</Use64Bitcompiler> to the first Property Group of the project file

Discussion

pic
Editor guide