What to do if, compiling in release mode a Universal Windows app, this error is displayed: “LOGGERBASEDEXECTASK : ILC error ILC1004”

It happened to me to have my prototype Universal Windows app compile and run in debug mode, but when I switched in release mode a strange “LOGGERBASEDEXECTASK : ILC error ILC1004” was trown.

Searching in the MSDN forum I found this thread (RTM Known Issue: Release configuration fails to build on using Desktop and Mobile Extension SDKs in a Universal Windows app) related to the RTM version, but the problem was the same with my final release and the solution suggested worked for me too.

The problem is related to the Microsoft.NetNative.targets not properly updated, so that error occurs if both the Desktop and Mobile Extensions for the UWP are referenced.
Therefore, if you added both (as I did) only for future possible use of specific platform Api, just remove the Mobile one. However a more definitive solution is to follow the suggested work around to this issue, that is updating the targets file:

  1. Close all instances of Visual Studio.
  2. Copy the file from https://gist.github.com/MattWhilden/7579984e0d8e6541716a
  3. Replace the Microsoft.NetNative.targets under C:\Program Files (x86)\MSBuild\Microsoft\.NetNative with the new targets file.
  4. Relaunch Visual Studio and rebuild your solution.
Annunci

Informazioni su Enzo Contini

Electronic engineer
Questa voce è stata pubblicata in Windows, Windows Phone/Mobile. Contrassegna il permalink.

Lascia un Commento/Leave a comment

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...