Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Span<T> and friends not working in .NET Native UWP app #5725

Closed
zharchimage opened this issue Apr 18, 2018 · 9 comments
Closed

Span<T> and friends not working in .NET Native UWP app #5725

zharchimage opened this issue Apr 18, 2018 · 9 comments

Comments

@zharchimage
Copy link

Basically my problem is described here

I cannot compile in .Net Native using System.Memory Span code. I get a .net native targets error.

@MichalStrehovsky
Copy link
Member

System.Memory is in prerelease status and doesn't work yet with .NET Native. The next version of .NET Native compiler will have support for this.

@zharchimage
Copy link
Author

You know when the next .Net Native version is gonna be available? Can't wait to use Span.

@MichalStrehovsky
Copy link
Member

I'm not at liberty to talk about schedules - I suggest following the Visual Studio blog. I'll try to update this issue when it's available or a release date has been officially communicated.

@zharchimage
Copy link
Author

Hi Michael, the release of .net core 2.1 happened yesterday, and System.Memory and Span nuget package is in release already. Still not compatible with .net Native. Do you have further information on when this is going to happen?

@davidfowl
Copy link
Member

System.Memory has a bug in the package preventing it from being used in Xamarin apps and UWP apps. This is being rectified in a couple of weeks.

@zharchimage
Copy link
Author

Thanks for the quick answer!

@davidfowl
Copy link
Member

Here's the fix dotnet/corefx#29970

@MichalStrehovsky
Copy link
Member

The .NET Native compiler that will work with System.Memory (including the prerelease version of the package that should otherwise not have the targeting issue) is included in Microsoft.NETCore.UniversalWindowsPlatform version 6.1.4 or later. Note that in order to use this version of the UWP platform package, you need to target the Fall Creators update of Windows 10 (an unfortunate side effect of NetStandard 2.0 support requiring new Windows APIs).

@zharchimage
Copy link
Author

We have clients that are using older versions of Windows, so for compatibility purposes I have the following configuration:
image

So I won't be able to access to Span targeting 10240 right?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants