Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Unsupported properties used in WinRT #458

Closed
augiem opened this issue Aug 5, 2014 · 6 comments
Closed

Unsupported properties used in WinRT #458

augiem opened this issue Aug 5, 2014 · 6 comments

Comments

@augiem
Copy link
Contributor

augiem commented Aug 5, 2014

In the 2.6.2 SDK, DirectX11_2-winrt:
SharpDX.dll contains the following properties which are not supported by the WinRT framework:

SharpDX.Utilities::GetGuidFromType - uses TypeInfo.GUID
SharpDX.Utilities::IsEnum - uses TypeInfo.IsEnum
SharpDX.Utilities::IsValueType - uses TypeInfo.IsValueType
SharpDX.Utilities::FindExplicitConverstion - uses Type.BaseType
SharpDX.Utilities::IsTypeInheritFrom - uses Type.BaseType
SharpDX.Win32.Variant::set_Value - uses Type.IsPrimitive

@augiem augiem changed the title Unsupported methods used in WinRT DLLs Unsupported properties used in WinRT DLLs Aug 5, 2014
@ArtiomCiumac
Copy link
Contributor

Can you please provide more information about the issue - are you getting certification errors? The latest version of SharpDX builds and passes successfuly supported API test for Win8 certification.

If you want to use it for desktop apps - then you should use the assemblies from DirectX11_2-net40.

@augiem
Copy link
Contributor Author

augiem commented Aug 5, 2014

Hi, thanks for replying!

I'm using SharpDX.dll and SharpDX.Xinput.dll for a Windows 8 App store app generated by the Unity game engine. Unity does a pre-build check of the DLLs and searches the DLLs for all calls not supported by the final framework. It will not allow you to build the project if there are any unsupported calls.

I just checked the DirectX11_2-net40 DLLs and they too contain the same unsupported members. Checking the MSDN reference, they are not supported in the Windows 8 App Store framework.

@augiem
Copy link
Contributor Author

augiem commented Aug 5, 2014

Interesting... I just found this post from Alexandre Mutel:
http://social.msdn.microsoft.com/Forums/windowsapps/en-US/2efedf2a-46cd-40c8-aebf-17ede6f0bb6c/how-to-handle-typexxxgettypeinfo-breaking-changes-in-45-metro-profile?forum=winappswithcsharp

It appears that he created an extension method for type.GetTypeInfo() to get the TypeInfo for Win 8 Store to get around the fact that Type no longer supported these properties, but then used the properties on the TypeInfo class which are also not supported in Win 8 Store. I'm surprised this passes certification.

@augiem augiem changed the title Unsupported properties used in WinRT DLLs Unsupported properties used in WinRT Aug 5, 2014
@ArtiomCiumac
Copy link
Contributor

Well, the truth is that this passes certification. These properties were there since support for WinRT has been added and there are published WinRT apps that use SharpDX. I suppose there are the following scenarios that can happen:

  1. You are trying to use SharpDX as a Portable Class Library - but such usage is not supported yet and you have to reference correct assemblies for each platform.
  2. The references are messed up and target incorrect assemblies.
  3. The tests either are verifying incorrect assemblies or have a bug.

Can you please post a sample project that reproduces the issue that I can check? For WinRT platform you should use assemblies from DirectX11_2-winrt. If possible - try to validate the same assembly with regular certification kit outside of Unity and compare the results.

@augiem
Copy link
Contributor Author

augiem commented Aug 6, 2014

I don't believe that Unity is trying to build as portable, and all the references are correct. Unity is quite finicky, however, and there is a way it seems that you can fool it into skipping the verification test. Anyway, I managed to get Unity build. You are correct, it does pass WACK as long as you build for the Windows 8.1. (8.0 fails due to many calls to external DLLs, but that's not the issue here.)

However, it does not make sense to me that these properties which are all listed as not compatible by the MSDN documentation would just work. If that is the case, then the MSDN documentation is wrong on all of these. I'm going to have to do some tests outside SharpDX to verify this.

As for a posting sample project, it seems to be primarily Unity that has issue with these properties. They must be doing their pre-build verification based on incorrect MSDN documentation. I don't think it would be appropriate to ask you to spend time debugging Unity, so I'll leave it at that. I'm going to have to ask Unity about the flagging of these properties.

Thanks for your help!

@xoofx
Copy link
Member

xoofx commented Aug 6, 2014

Yeah, these properties are valid and pass certification just fine, MSDN documentation is wrong (not even updated with PCL). For Unity, don't know how they are checking this, but in the end, the only relevant one is the Microsoft store certification.

@xoofx xoofx closed this as completed Aug 6, 2014
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