DEV Community

Muhammad Azeez
Muhammad Azeez

Posted on

2 1

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

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

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay