cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Managed API in UWP app

nborrerojr.
12-Amethyst

Managed API in UWP app

I am trying to convert a Windows Store App to a UWP. Since the Managed API (MKS.ManagedAPI.dll) seems to be based on .NET 4 and UWP is .NET Core, it's not completely straight forward. Is there a way to get the API to work with a UWP?

ACCEPTED SOLUTION

Accepted Solutions

This was painful but I have it working now. Here's what happened:

At this line:

MKS.ManagedAPI.IntegrationPoint.CreateSession(String sessionUser, String sessionPassword)

 

I was getting this exception:

System.TypeLoadException
  HResult=0x80131522
  Message=Could not load type 'System.Threading.ThreadPriority' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
  Source=MKS.ManagedAPI

 What fixed it was checking "Compile with .NET Native tool chain" in Build settings.

View solution in original post

1 REPLY 1

This was painful but I have it working now. Here's what happened:

At this line:

MKS.ManagedAPI.IntegrationPoint.CreateSession(String sessionUser, String sessionPassword)

 

I was getting this exception:

System.TypeLoadException
  HResult=0x80131522
  Message=Could not load type 'System.Threading.ThreadPriority' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
  Source=MKS.ManagedAPI

 What fixed it was checking "Compile with .NET Native tool chain" in Build settings.

Announcements


Top Tags