microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.36k stars 2.22k forks source link

UWP .Net Native compiler crashing #1147

Open edward-a opened 4 years ago

edward-a commented 4 years ago

I am unable to compile UWP application in Release configuration when the following two lines added to the project:

public struct TestStruct { } public delegate ref TestStruct TestDelegate();

The below is from the Output window:

1>------ Build started: Project: NetNativeCrash, Configuration: Release x64 ------ 1> NetNativeCrash -> C:\Projects\NetNativeCrash\bin\x64\Release\NetNativeCrash.exe 1> Processing application code 1> Computing application closure and generating interop code 1> Loading 44 modules... 1> Generating code... 1> Interop code generated. 1> Compiling interop code 1> Generating System.Reflection.DispatchProxy proxy code. 1> Cleaning up unreferenced code 1> Generating native code 1>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\x64\ilc\Tools\nutc_driver.exe @"C:\Projects\NetNativeCrash\obj\x64\Release\ilc\intermediate\MDIL\NetNativeCrash.rsp"' returned exit code 2 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

MitchBomcanhao commented 4 years ago

does it compile if you use a compiler that's not a pre-release package, ie 2.2.3? (downgrade Microsoft.NETCore.UniversalWindowsPlatform to 6.2.8)