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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Managed API in UWP app

nborrerojr.
7-Bedrock

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?

1 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.

Top Tags