Temuri
Temuri

Reputation: 21

WACK fails when UWP solution includes Windows Runtime Component (C#)

My UWP-app (C++ XAML/DirectX) is using Windows Runtime Component (C#) (*)

Windows App Cert Kits "Supported API Test" fails with error (**) that suggests i should activate .net native. If that is the case how do i can compile WRC to native? WRC project don't have any options involving .net native and my project is C++ app which is also lacks any options regarding .net native.

Note:

(*) WRC that i use is https://www.nuget.org/packages/NotificationsExtensions.Win10/

(**) Error that i got:

Edit: I use Windows 10, Visual Studio 2015 Update 3 with latest Windows 10 SDK (version number is 10.0.14393.33)

Upvotes: 0

Views: 568

Answers (2)

Temuri
Temuri

Reputation: 21

It is actually supported scenario - you can publish such apps to Windows Store just fine and error is just a bug on the WACK part and can be ignored.

Upvotes: 1

Evgeny  Ipatov
Evgeny Ipatov

Reputation: 101

It's unsupported scenario in Windows 10 UWP apps. C# code in UWP should be compiled with .NET Native to pass certification (although it can run freely without .NET Native compilation!). But .NET Native toolchain doesn't support native compilation of particular Windows Runtime Components. It's supported only for scenario when main app is also C# app. So, when you reference C# WinRT component from C++ code, it loads .NET Runtime during component activation (as it doesn't compiled to native code with .NET Native!) and .NET Runtime is restricted for store certification and so WACK fail.

Upvotes: 0

Related Questions