3
votes

I've updated Visual Studio 2015 to Update 2. And now .NET Native compiler stops working every time I compile the project. (It works just great for the blank app).

STARTPROCESSTASK : error : Internal compiler Error

error : Method 'A(object)' will always throw an exception due to the missing method 'B'. There may have been a missing assembly.

error : ILT0005: 'C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\Tools\nutc_driver.exe @"C:\Projects\x86\Release\ilc\intermediate\MDIL\App5.rsp"' returned exit code -1073741819

That's actually true that some assemblies are missing but I have a lot of some legacy stuff and I will not get those assemblies. Before Update 2 compiler gave me a warning instead of error and the app ran without any issues.

3
Just did a little investigation on this problem, seems installing the English language package in Visual Studio will solve this problem.Grace Feng
I have the same problem in Visual Studio 2017.A-Sharabiani

3 Answers

2
votes

Just to help conclude this thread - we did release an update to Visual Studio that includes a fix for this issue. If you are installing Visual Studio 2015 Update 2 for the first time, you will automatically get the fix. If you already have Visual Studio 2015 Update 2 installed and are running into this issue, please go to Add/Remove Programs, Choose Change, Choose Modify, and then make sure that you have the 1.3.2 version of the Tools for Universal Windows apps.

1
votes

I work on the .NET Native runtime and compiler team. Sorry the update is causing you trouble. This looks very similar to an issue we're working on related to issues with non-English language packs. We expect to have an fix available soon. If you can run using the English language pack while we work on getting a fix out, that can get you unblocked.

As for the assembly warnings: When you have an application that doesn't have all of the assembles in the dependency graph available at compile time, the .NET Native compiler will insert a "dummy" method/type that will throw exceptions at runtime. Additionally we'll print a warning about this happening as a heads up. If you never end up calling that code, no problem. However, there are cases where failing compilation can be caused by missing references. This leads to the behavior that all of these Warnings are "upgraded" to Error if compilation fails.

I expect that once we have a fix for the compiler crash, these will return to warnings and you'll be on your way.

-1
votes

I had the same problem in Visual Studio 2017. (our project was originally created in Visual Studio 2015).

This is how I resolved it:

  1. Right Click on UWP project -> Properties -> Build.
  2. Uncheck Compile with .Net Native tool chain.