You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Sorry if this is the wrong place for .net native and UWP compile errors.
I have a UWP app, and we have been using debug mode during develop. We are trying to build in release mode with .net native toolchain (this is quite important for us to get the high performance.)
However we get an internal compiler error:
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(3164,5): warning : APPX4001: Build property AppxBundlePlatforms is not explicitly set and is calculated based on currently building architecture. Use 'Create App Package' wizard or edit project file to set it.
8> Processing application code
8> Computing application closure and generating interop code
8> Loading 121 modules...
8> Generating code...
8> Interop code generated.
8> Generating serialization code
8> Compiling interop code
8> Generating System.Reflection.DispatchProxy proxy code.
8> Cleaning up unreferenced code
8> Generating native code
8>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.3\tools\x64\ilc\Tools\nutc_driver.exe @"C:\dev\repos\ILMD\ILMD.App\ILMD.App\ILMD.App.UWP\obj\x64\Release\ilc\intermediate\MDIL\ILMD.App.UWP.rsp"' returned exit code 1
========== Build: 7 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I ran using msbuild and versbose and nutc_driver.exe gives internal compiler error but no more useful information.
I would be willing to send my source code for testing privately.
Can you try adding <Use64BitCompiler>true</Use64BitCompiler> to a PropertyGroup in your main project? Mysterious nutc_driver crashes are often due to the compiler running out of memory.
You should be able to verify that it's doing the new thing if you see C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.3\tools\x64\ilc\ Tools64 \nutc_driver.exe running instead of the one from the Tools directory.
Well, at least we know that the problem is that the code is too big. In the Properties folder of your main app project, you'll find a "Default.rd.xml" file - it has this line in it:
Try commenting it out - it tells the compiler to consider all the code in your app used - that's unlikely the case, especially if you use many NuGet packages. If your app builds and works, great, we're done.
If it builds, but doesn't work, put the line back in and look at the list of assemblies in your app. Try to pick assemblies that are big and are unlikely to be used with reflection and add following lines for them:
This makes the *Application* line no longer apply to those assemblies. Hopefully the compiler will be able to remove enough unused code that the app will compile and still work.
In my case, it did not help to solve the same problem:
Error ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.native.compiler\2.2.3\tools\x86\ilc\Tools64\nutc_driver.exe @"C:\Install_DIR\bcwipe_tm.git\bcwipe_uwp\bcwipe_uwp\obj\x86\Release\ilc\intermediate\MDIL\bcwipe_uwp.rsp"' returned exit code 1
Which I assume should be an absolute minimum, but rhbind still runs out of memory and crashed, im using 64bit compiler too.
This is for a LOB app, win msft store, so id be happy as a solution, to be allowed to deploy the app to the store without .net native compilation, but this doesnt seem possible?
same here. I use Use64BitCompiler>true</Use64BitCompiler and have 32GB RAM on my machine.
Also running ReactiveUI libs , can't build UWP in release mode anymore. My last working version was using ReactiveUI version 9.13.1
I have tried the solution from @MichalStrehovsky on my top 20 assemblies in size without success where you use : Assembly Name="*Application*" Dynamic="Required All" Assembly Name="*Assembly1*" Dynamic="Auto"
If that doesn't help, please email dotnetnative at microsoft dot com - out of all the people who're in charge of servicing .NET Native, I'm the only one who hangs out in this repo and I don't scale well.
Any news on this Issue?
We want to push our Xamarin.Forms.UWP app (Which is a bit bigger) into the Microsoft Store, and the Release Build is never finishing.
With uncommenting <Assembly Name="*Application*" Dynamic="Excluded" /> it got build (after 35 Minutes), but crashes immediatly.
(This comment was edited by @MichalStrehovsky to make inline XML visible)
No, nothing new. We are thinking to throw away our whole UWP project. Because it behaves completely different in Release with ". Net native compilation" than in Debug. And the windows store is forcing us to activate this.
Have you tried compiling with Visual Studio 2019 16.3.3+.
The release notes of v16.3.3 contains this fix:
A fix is made to address a compiler internal error when the code has an out-of-line definition of a static data member of a nested class inside a partial specialization.
No idea if that's the problem here, but at least worth a try.
i have the same problem
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): error : RHBIND : error RHB0002: Failed to write PDB.
After I have added SyncFusion ReportView Control to my App the native compile not working.
When Microsoft Fix this problem? is possibile in 2019 to loose working days for this problems?
@premiaware Can you please reach out to dotnetnative at microsoft dot com by email? It's the best channel to make sure your problems are heard by the right people. People in charge of servicing .NET Native don't monitor this repo.
Ok so I've finally got around to sorting this out and here are some notes:
I dont know why this issue is closed, its not fixed
symptoms are: if you use .net toolchain and devops pipelines to build a large app you will probably hit this error (if I were to guess I would say its a the build machine running out of memory trying to sort dependencies)
to fix the issue it looks like you have to construct the dependencies as DevEddy suggested manually. This doesn't seem very maintainable but is the only workaround provided.
When I constructed mine I had 310 dependencies I had to manually add, As this was laborious and prone to error I wrote a small console application to create these lines manually. attached below:
Activity
MichalStrehovsky commentedon May 8, 2019
Can you try adding
<Use64BitCompiler>true</Use64BitCompiler>to a PropertyGroup in your main project? Mysterious nutc_driver crashes are often due to the compiler running out of memory.You should be able to verify that it's doing the new thing if you see C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.3\tools\x64\ilc\ Tools64 \nutc_driver.exe running instead of the one from the Tools directory.
danwalmsley commentedon May 8, 2019
@MichalStrehovsky ok I get a bit further now thanks!
However now I get
MichalStrehovsky commentedon May 8, 2019
Well, at least we know that the problem is that the code is too big. In the Properties folder of your main app project, you'll find a "Default.rd.xml" file - it has this line in it:
Try commenting it out - it tells the compiler to consider all the code in your app used - that's unlikely the case, especially if you use many NuGet packages. If your app builds and works, great, we're done.
If it builds, but doesn't work, put the line back in and look at the list of assemblies in your app. Try to pick assemblies that are big and are unlikely to be used with reflection and add following lines for them:
This makes the
*Application*line no longer apply to those assemblies. Hopefully the compiler will be able to remove enough unused code that the app will compile and still work.danwalmsley commentedon May 8, 2019
@MichalStrehovsky great just commenting out the
*Applicationline made it compile.May I thank you greatly for you excellent support and great work that you are doing on CoreRT.
losbojos commentedon May 30, 2019
In my case, it did not help to solve the same problem:
Error ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.native.compiler\2.2.3\tools\x86\ilc\Tools64\nutc_driver.exe @"C:\Install_DIR\bcwipe_tm.git\bcwipe_uwp\bcwipe_uwp\obj\x86\Release\ilc\intermediate\MDIL\bcwipe_uwp.rsp"' returned exit code 1
losbojos commentedon May 30, 2019
But I solved the problem by increasing the amount of RAM on the virtual machine from 2 to 8 GB
danwalmsley commentedon Aug 12, 2019
@MichalStrehovsky hi, im reopening this issue because my app has gotten a little bigger now and the
error : RHBIND : error RHB0002: Failed to write PDB.has come back.Iv tried
Which I assume should be an absolute minimum, but rhbind still runs out of memory and crashed, im using 64bit compiler too.
This is for a LOB app, win msft store, so id be happy as a solution, to be allowed to deploy the app to the store without .net native compilation, but this doesnt seem possible?
Any advice is greatly appreciated.
Dan
Pinox commentedon Aug 15, 2019
same here. I use Use64BitCompiler>true</Use64BitCompiler and have 32GB RAM on my machine.
Also running ReactiveUI libs , can't build UWP in release mode anymore. My last working version was using ReactiveUI version 9.13.1
I have tried the solution from @MichalStrehovsky on my top 20 assemblies in size without success where you use :
Assembly Name="*Application*" Dynamic="Required All"Assembly Name="*Assembly1*" Dynamic="Auto"MS please provide some pointers how to proceed.
MichalStrehovsky commentedon Aug 16, 2019
@Pinox Can you try downgrading Reactive like described here: #7687 (comment)
If that doesn't help, please email dotnetnative at microsoft dot com - out of all the people who're in charge of servicing .NET Native, I'm the only one who hangs out in this repo and I don't scale well.
downgraded System.Reactive to 4.0.0 due to this bug: dotnet/corert#7408
simader commentedon Sep 23, 2019
Any news on this Issue?
We want to push our Xamarin.Forms.UWP app (Which is a bit bigger) into the Microsoft Store, and the Release Build is never finishing.
With uncommenting
<Assembly Name="*Application*" Dynamic="Excluded" />it got build (after 35 Minutes), but crashes immediatly.(This comment was edited by @MichalStrehovsky to make inline XML visible)
MichalStrehovsky commentedon Sep 23, 2019
@simader Can you please reach out to dotnetnative at microsoft dot com by email? It's a better channel to report .NET Native issues and get help.
DevEddy commentedon Oct 12, 2019
@simader could you get any new info to this? Same problem.
Eddy
simader commentedon Oct 15, 2019
No, nothing new. We are thinking to throw away our whole UWP project. Because it behaves completely different in Release with ". Net native compilation" than in Debug. And the windows store is forcing us to activate this.
jipjan commentedon Oct 15, 2019
Have you tried compiling with Visual Studio 2019 16.3.3+.
The release notes of v16.3.3 contains this fix:
No idea if that's the problem here, but at least worth a try.
premiaware commentedon Oct 18, 2019
i have the same problem
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): error : RHBIND : error RHB0002: Failed to write PDB.
After I have added SyncFusion ReportView Control to my App the native compile not working.
When Microsoft Fix this problem? is possibile in 2019 to loose working days for this problems?
MichalStrehovsky commentedon Oct 18, 2019
@premiaware Can you please reach out to dotnetnative at microsoft dot com by email? It's the best channel to make sure your problems are heard by the right people. People in charge of servicing .NET Native don't monitor this repo.
DevEddy commentedon Dec 2, 2019
If anyone else looking for a solution, found in this comment: https://developercommunity.visualstudio.com/comments/742027/view.html
For me I needed to add to my csproj:
and add my used libs to
Default.rd.xmlGreetings,
Eddy
JKennedy24 commentedon Dec 3, 2019
Hi @DevEddy Can I dig for a bit more info.
Did you add the
<ShortcutGenericAnalysis>true</ShortcutGenericAnalysis>to your App.UWP.csproj? and did you add it to any other csproj files?Also when you say
Could you expand upon this, i.e. how did you do this and what did you end up adding? What did your
Default.rd.xmlend up looking like?My default.rd.xml currently fails and looks like:
And I read alot about the
*Application*line causing this error.It would be a great help if you could provide a bit more info
Thanks
DevEddy commentedon Dec 3, 2019
HI @JKennedy24,
sure, like described in the linked comment I did the following:
Add
ShortcutGenericAnalysisjust to the UWP.csprojStart from nothing.
*Application*directiveI got my dependencies by inspecting the following folder after previous successful release build:
obj\[architecture]\Release\ilc\inMy
Default.rd.xmllooks like this: Default.rd.xml.zipGreetings,
Eddy
JKennedy24 commentedon Apr 23, 2020
Ok so I've finally got around to sorting this out and here are some notes:
When I constructed mine I had 310 dependencies I had to manually add, As this was laborious and prone to error I wrote a small console application to create these lines manually. attached below:
DefaultRDXMLCreator.zip
jkotas commentedon Apr 23, 2020
It is closed because of CoreRT is not the right place to report .NET Native for UWP issues. The right places are:
ACTUAL revert to debug build - error with release build memeory issues