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

Managed API in UWP app

SOLVED
Highlighted
Regular Member

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?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Managed API in UWP app

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
Highlighted

Re: Managed API in UWP app

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

Announcements