“Unknown Runtime Error” when using Windows Runtime Component with Javascript UWP PWA

Pramod Garikapati 1 Reputation point

I'm trying to use a Windows Runtime Component to provide interoperability between my Javascript UWP PWA app and C# logic that I've written.
If I set the minimum version to Fall Creator's Update (build 16299, need to use .NET Standard 2.0 libraries),
I get the following error when trying to call a simple method: "JavaScript runtime error: Unknown runtime error"
If I run this code using Creator's Update (15063) as the minimum, then the code runs fine.

Can someone please let me know how to solve this issue.

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. AlexanderSklar 11 Reputation points

    @Pramod Garikapati I believe you are running into an issue where the non-C# code isn't referencing the .net native nuget package. I've written instructions to get this scenario to work from a C++ app but hopefully similar/the same instructions apply to the PWA project
    How to consume a C# WinRT component from C++/WinRT