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:
- Close all instances of Visual Studio.
- Copy the file from https://gist.github.com/MattWhilden/7579984e0d8e6541716a
- Replace the Microsoft.NetNative.targets under C:\Program Files (x86)\MSBuild\Microsoft\.NetNative with the new targets file.
- Relaunch Visual Studio and rebuild your solution.