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

Pramod Garikapati 1 Reputation point
2020-03-12T12:19:59.307+00:00

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),
https://devblogs.microsoft.com/dotnet/announcing-uwp-support-for-net-standard-2-0/,
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
    2020-04-22T01:05:33.697+00:00

    @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