question

MarcoEnxuto avatar image
4 Votes"
MarcoEnxuto asked zipswich commented

.Net Native raises ILT0005 when compiling UWP project in Release configuration

Hi,
I've been searching online for this error, here and on MSDN Foruns and none of them have the answer.
My project has the following configuration:
TargetPlatformMinVersion 10.0.15063.0
TargetPlatformVersion 10.0.17763.0

Log info:
x64 compiler

C

:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.6\tools\Microsoft.NetNative.targets(697,5): error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.6\tools\x64\ilc\Tools\nutc_driver.exe @"C:\Users\marco\Source\Workspaces\App1\Dev\App1\obj\x64\Release\ilc\intermediate\MDIL\App1.rsp"' returned exit code 1

x86 compiler
C

:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.6\tools\Microsoft.NetNative.targets(697,5): error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.6\tools\x86\ilc\Tools\nutc_driver.exe @"C:\Users\marco\Source\Workspaces\App1\Dev\App1\obj\x86\Release\ilc\intermediate\MDIL\App1.rsp"' returned exit code 1

The project uses several nuget packages. See the picture for more details. Also, i read somewhere that having several nuget packages, could cause this issue with the compiler.
12261-annotation-2020-07-15-013720.png

Here's the workarounds i tried based on my online findings:

I'm out of options. Looks like this issue still exists but only happens with my project on several machines i tested. Even a device with 40GB of RAM, since i learned the compiler crashes with the lack of memory. I didn't see that info on the compiler log though.

I activated the VS Diagnostics verbosity and log for more details, but i only found the lines described above with that relevant information.

I have VS2019 16.6.4 installed today.


windows-uwp
· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I created a blank app and added these NuGet packages. Then I try to run and generate packages but I didn't meet the issue. I'm asking the team now about this issue. There might be some time delay.

0 Votes 0 ·

Hi,

Recently, I hit the issue. Tom from the .NET Native team answered me a very detailed answer. It's too big to write here unfortunately. Also, the upload a file feature is broken (403 is happening). I told the issue at my WinDev MVP channel.

You can see my text file of email from .NET Native team: https://1drv.ms/t/s!Aj7hlcEeURZfmrEqVifit9WnbdW7NA?e=Jwn6ik

3 Votes 3 ·

Any chance of resharing the link or providing the text - the file is no longer there? I'm having the same problem and I've tried everything I can find on the various forums.

1 Vote 1 ·

It's really appreciated for sharing this with us. It helps a lot. Thank you.

0 Votes 0 ·

I'm unable to get the text file from your link

0 Votes 0 ·

Hi, thanks for the reply. I figured out! I started to remove dependencies since my intuition pointed to that. It looks like System.Numerics.Vectors as a nuget package causes this issue. I removed it, and now it compiles successfully. Anyway, I installed because VS warned me the following: warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.. So i went to package manager, and added the nuget.
Is there a way to suppress, ignore or comply to this warning?

0 Votes 0 ·

Glad to hear that you find the cause. After you removed the NuGet package, has your application's functionality been affected? If not, then you could ignore it. If you get errors that might be a problem.

1 Vote 1 ·
Show more comments

I'm getting the same error but for ARM64. Anyone have ideas what the fix could be?

0 Votes 0 ·
AlexK-2254 avatar image
0 Votes"
AlexK-2254 answered MarcoEnxuto commented

I'm having similar issue but probably worse. Can anybody help me out with resolving it? I'm using Google.Apis.Drive.v2 version 1.25.0.862. It looks like this is the last version that is supposed to work on UWP all versions after that have a remark that they will build but won't work. When I build the app with this version I have no compile errors but in runtime I have this exception when I call anything from Google.Apis.Drive.v2

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.AuthorizeAsync(String userId, CancellationToken taskCancellationToken)
at Google.Apis.Auth.OAuth2.AuthorizationCodeWindowsInstalledApp.<AuthorizeAsync>d_7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.<AuthorizeAsync>d
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at MgScopes.Net.GoogleDrive.GoogleDriveStorage.<CreateAsync>d
_26.MoveNext()

I figured out that if I reference Microsoft.Bcl.Async version 1.0.168 everything works in runtime. Frankly speaking I don't remember now why I chose this version and I didn't try others. Anyway this is something old and was intended for VS 2012 if the description is right. So, after I do that I cannot build an application package for publishing, I'm getting that ILT0005. If I remove Microsoft.Bcl.Async the package builds but google drive does not work. How to resolve this?

Thank you,
Alex

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, did you ask in the google SDK forums? You might get better answer than here.

0 Votes 0 ·
AlexK-2254 avatar image
0 Votes"
AlexK-2254 answered

There are two questions one really should go to Microsoft team, that is why I have that ILT00005 when I add Microsoft.Bcl.Async of the version 1.0168 to the project and this is what I hope somebody will be able to answer. Another question might go to the Google team but their answer was short - they don't support UWP after version 1.25.0.862 and they don't care about anything related to UWP.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

zipswich avatar image
0 Votes"
zipswich answered zipswich commented

A method has worked twice to resolve the same error ILT0005. Let me report it here.

VS builds the packages of the release bundle of an app in the following order: x86, x64, ARM.

Case 1: It always failed at .rsp of the x64 package. I tried many times to no avail.
I did the following:

  1. Built x64 package only and it succeeded.

  2. Built the bundle with all 3 packages and it succeeded.

Case 2: It always failed at .rsp of the ARM package.
I did the following:

  1. Built ARM package only and it succeeded.

  2. Built the bundle with all 3 packages and it succeeded.

I have no clue why this method worked.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So, do we have a way to change the order? Thanks for posting here.

0 Votes 0 ·

II do not know any way to do it.

0 Votes 0 ·