LINQKit: .NET Native Compiler error
Hi,
I’m trying to build a UWP in the release configuration with the .NET Native toolchain, but LINQKit appears to break it. The Compiler breaks as soon as LINQKit is referenced somewhere in the code. It throws the following error:
// Error List window
Internal compiler error: Sequence contains no elements
// Build output window
1>------ Build started: Project: NativeLinqkitTest, Configuration: Release x64 ------
1> NativeLinqkitTest -> C:\Users\pjura\Desktop\NativeLinqkitTest\NativeLinqkitTest\bin\x64\Release\NativeLinqkitTest.exe
1> Starting .NET Native compilation
1> Processing application code
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\IlcInternals.targets(936,5): error : Internal compiler error: Sequence contains no elements
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Sadly it doesn’t provide any line number or file. The error happens for me when the .NET Toolchain is enabled on both x86 & x64, Targeting any version of Windows 10. The error happens on both the main LINQKit and the EFCore version. LinqKit.Core does not throw this error.
Steps to reproduce:
- Create a blank Universal Windows Application project
- Add the nuget package for LINQKit or LINQKit.EFCore
- Create a new method or override OnNavigatedTo in MainPage.xaml.cs
- Write a line of code that will reference LINQKit, e.g.:
IQueryable<string> set = null;
set.AsExpandable();
// OR
var x = PredicateBuilder.New<string>();
- Set the project to Release configuration or enable the .NET Native toolchain in the project settings (enabled by default for the Release configuration)
- Build the project => You should see the error.
Do you know any workaround?
Otherwise, thanks for LINQKit 😃
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17
Commits related to this issue
- Fix UWP in Release issue Linked to issue #47 in IntrospectionExtensions — committed to scottksmith95/LINQKit by StefH 8 years ago
Hello! I work on the .NET Native runtime and compiler team. A random walk of github issues finds me here. I’m able to reproduce this issue and will definitely investigate further.
In particular, this output from the compile step definitely looks like our issue: “IlcInternals.targets(936,5): error : Internal compiler error: Sequence contains no elements”
Will try to follow up before the end of the day. Ping me if you don’t hear from me though, can be easy to get distracted with other issues. 😃