I am in the process of trying to get our solution to build under the .Net Native tool chain, as well as passing the WACK (Windows App Cert Kit) tests that will be required to eventually upload our application to the store.
We currently have the build passing with the "Compile .Net Native tool chain" selected, as shown here (note optimize code not being checked):
Project Properties
However, while the build passes, we get the one following error when running the WACK:
WACK Failure with Optimize Code Disabled
Doing some googling, it appears this error is only cropping up for us because we have not enabled Optimize Code in the properties above - however, when we enable this setting, our build fails with the following error:
Build Failure with Optimize Code Enabled
Everyone I've seen with this issue on the internet has been having issues with either their Visual Studio language settings, or were living in some old version of Windows 10/Visual Studio, and had this issue just resolve itself over time.
I'm using the default English languages for the machine and Visual Studio. I'm also on an up-to-date Visual Studio 2017 (15.9.7 Professional), and the latest version of Windows 10 (17763.316). So none of these other resolutions apply to me here.
I'm hoping somebody out there has some knowledge around this ILT0005 error and how we can get around it. We are developing a C# application that uses some C++ projects, and the code all compiles fine with either .Net Native or Optimize Code enabled in the properties, but not both.
The solution to this was to include DoNotOptimize="true" to our rd.xml Directives, for example:
<Assembly Name="*Application*" Dynamic="Required All" DoNotOptimize="true" />
This allowed for us to both build in Release mode with "Compile .Net Native tool chain" and "Optimize Code" both selected - but also actually get the WACK tests to pass.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With