Highlighted

ANE with Windows universal library

Community Beginner ,
Jan 16, 2019

Copy link to clipboard

Copied

Im trying to create an ANE with Visual C++ Windows Universal DLL library on the native side, im using AIR 32.

But seems like the ANE only works if i use the Desktop Dynamic Link Library, if i try with universal i always get this error:

The extension context does not have a method with the name <name>.

Im wondering is this even possible?

Looking online i wasnt able to find any other ANEs that use the univeral library.

The reason im stuck with the universal type is because im trying to use Windows Facebook SDK in the ANE (winsdkfb).

I haven't used that particular Facebook SDK before.

I had a quick rummage with it. I had assumed it would work within a .NET project but in an issue they mention .NET is not supported and it is UWP only

You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

With the ML repo I am using UWP functionality but these Windows SDKs does come with WinRT bindings which allow them to be used with .NET (via Windows.Foundation.UniversalApiContract)

The Facebook sdk doesn't have that and without that there is no interop possible. It can be used only within a UWP app it appears.

Edit: Microsoft are improving UWP and "classic" desktop integration from 1809 onwards - but as it stands you can't even run UWP UI from within classic desktop code.

https://blogs.windows.com/buildingapps/2018/10/31/announcing-windows-community-toolkit-v5-0/#H8P1FL09Hucxsj1f.97

TOPICS
Development

Views

260

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ANE with Windows universal library

Community Beginner ,
Jan 16, 2019

Copy link to clipboard

Copied

Im trying to create an ANE with Visual C++ Windows Universal DLL library on the native side, im using AIR 32.

But seems like the ANE only works if i use the Desktop Dynamic Link Library, if i try with universal i always get this error:

The extension context does not have a method with the name <name>.

Im wondering is this even possible?

Looking online i wasnt able to find any other ANEs that use the univeral library.

The reason im stuck with the universal type is because im trying to use Windows Facebook SDK in the ANE (winsdkfb).

I haven't used that particular Facebook SDK before.

I had a quick rummage with it. I had assumed it would work within a .NET project but in an issue they mention .NET is not supported and it is UWP only

You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

With the ML repo I am using UWP functionality but these Windows SDKs does come with WinRT bindings which allow them to be used with .NET (via Windows.Foundation.UniversalApiContract)

The Facebook sdk doesn't have that and without that there is no interop possible. It can be used only within a UWP app it appears.

Edit: Microsoft are improving UWP and "classic" desktop integration from 1809 onwards - but as it stands you can't even run UWP UI from within classic desktop code.

https://blogs.windows.com/buildingapps/2018/10/31/announcing-windows-community-toolkit-v5-0/#H8P1FL09Hucxsj1f.97

TOPICS
Development

Views

261

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 16, 2019 0
Engaged ,
Jan 16, 2019

Copy link to clipboard

Copied

It is possible to use Universal libraries. You have to split your ANE in to 2 parts, the ANE dll which must remain as a Dynamic Link Library and another library which has your FB code.

See here for an example of an ANE which uses Microsoft UWP Machine Learning SDK.

The core logic is all in C# and the bridging between C++ and C# for FRE code is handled by another nuget package.

Windows-ML-ANE/MainController.cs at master · tuarua/Windows-ML-ANE · GitHub

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 16, 2019 1
Community Beginner ,
Jan 16, 2019

Copy link to clipboard

Copied

Thanks this helps a lot!

The part that that im having trouble with now is adding a universal library reference to the dynamic library, Visual Studio doesnt seem to let me do that and says its because the projects target different platforms.

Looking at the native visual studio project in that repo, part that uses UWP SDK dosent seem to be universal library? or am i just missing it?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 16, 2019 0
Engaged ,
Jan 16, 2019

Copy link to clipboard

Copied

I haven't used that particular Facebook SDK before.

I had a quick rummage with it. I had assumed it would work within a .NET project but in an issue they mention .NET is not supported and it is UWP only

You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

With the ML repo I am using UWP functionality but these Windows SDKs does come with WinRT bindings which allow them to be used with .NET (via Windows.Foundation.UniversalApiContract)

The Facebook sdk doesn't have that and without that there is no interop possible. It can be used only within a UWP app it appears.

Edit: Microsoft are improving UWP and "classic" desktop integration from 1809 onwards - but as it stands you can't even run UWP UI from within classic desktop code.

https://blogs.windows.com/buildingapps/2018/10/31/announcing-windows-community-toolkit-v5-0/#H8P1FL0...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 16, 2019 1