-
Notifications
You must be signed in to change notification settings - Fork 5k
ICustomMarshaler not supported in UWP/WinRT #9169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The code pointed to that does the |
It does. IsAppXProcess is going to return false in .NET Core apps running as Centennial. |
The differentiation happens in the host .exe that is used to launch the process. The UWP host used to run UWP apps sets the |
Right. Work in progress to make these differences more discoverable: https://github.com/dotnet/corefx/issues/18405 |
I'm going to close this as it seems answered. All .NET Standard API is available on UWP now and the vast majority of it will work as expected. There are some limitations due to the platform. |
I think there is still an open question of whether .NET Core should allow ICustomMarshaler on UWP or not. .NET Core appears to support it on non-UWP platforms. The conversation so far established that there may be functional differences with .NET 2.0 Standard APIs, but it's not clear what the reason is for blocking this particular API if that's intended (the other marshaler types blocked for UWP seem to make sense in that they specifically block some Win32-only functionality). Some people use this to do custom string marshaling for UTF8 strings, for example, which would still be relevant with UWP apps using open-source C/C++ libraries. |
How is one supposed to alleviate these non-supported calls then, rewrite perfectly working code just for UWP ? You could have at least updated your docs, or provided an example for an alternative way. |
UnmanagedType.CustomMarshaler
andICustomMarshaler
are both supported by .Net Core 2.0/.Net Standard 2.0, but not supported in UWP/WinRT. I can't seem to find any documentation that lists specific .Net Standard APIs not supported in UWP/WinRT, but I would think this isn't the only case.See mtypes.h for a list of marshaling that's allowed.
For more information: I received an error "Custom marshalers are not supported", which led me here, which led me to the handling of this case for AppX processes here
I assume that this means that UWP/WinRT isn't actually .Net Standard 2.0 compliant? Or is there not a guarantee that all APIs are functional?
The text was updated successfully, but these errors were encountered: