System.memory nuget package causing .net native fail
I'm attempting to use the System.Memory nuget package for Span<T> support in my UWP app.
Unfortunately, while everything works in debug, compiling in release mode using the .net native toolchain fails with the following error message:
Internal compiler error: Object reference not set to an instance of an object.
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets 697
The project I'm working on is open source and available here.
Tested a bit more, it seems it works if I set the minimum required UWP SDK to 16299. Unfortunately as I'm targeting phones too I need to keep 15063 as the baseline.
@nattress do you have a place where .Net Native issues are tracked? We could move this to corefx.
@Petermarcu Not on Github. corefx would probably be a good place for this question.
@albertofustinoni Span<T> support was only recently added for UWP apps. It is unfortunately not available pre-16299 so if you want to keep 15063, you'll be unable to use Span<T>. You'd have to roll forward to version 6.1.5 of the Microsoft.NETCore.UniversalWindowsPlatform package in your app project.
Ok, I think that answers the question though. I'm going to close this issue here as the solution is to move to a newer version and we don't plan to bring it to older versions.
@nattress This doesn’t make sense to me: System.Memory is .net standard 1.1 (check Nugget) and UWP pre Fall Creators Update supports up to 1.4.
How can it not be compatible, especially when UWP debug builds work perfectly and other netstandard 1.4 assemblies I have that reference it work fine too?
@albertofustinoni Unfortunately a feature like Span
@nattress Ok now that makes sense. Thank you for your explanation. It’s just very saddening to see Windows 10 mobile die like this.