I'm getting the error NotImplementedException: Unmanaged activation is not supported
The error is caused by the System function GetTypeFromProgIDImpl
System.RuntimeType.GetTypeFromProgIDImpl (System.String progID, System.String server, System.Boolean throwOnError
Called by
System.Type type = System.Type.GetTypeFromProgID(progID, hostName, true);
This exception is not thrown when the script is running as Windows Console app but it does it running on Unity. What could cause this different behaviour?
This is a simple code that is throwing this exception in Unity but not in Cmd Prompt:
//using UnityEngine;
using System;
public string pid = "VisualStudio.DTE.15.0";
public string hostName = "localhost";
public void executeSysFunc(){
System.Type type = System.Type.GetTypeFromProgID(pid, hostName, true);
Console.WriteLine(type.GUID);
//Debug.Log(type.GUID);
}