How Do I use GAC Assemblies in Managed Code when Scripting?

How Can We Help?

< Back

Answer

One of the new features added in v6.0.3 was the ability to use GAC assemblies in Managed Code when scripting.

To use this feature at the activity level, we introduced a new placeholder specifically for GAC assemblies.

The below code will illustrate how to reference a GAC assembly to allow it to be used in the scripting.

At activity Level:

#XMReference
#XMReference
#XMGAC
System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089;
System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A;
#XMGAC
#XMUsings
System.Windows.Forms;
#XMUsings
public void VF10GACAssembly_OnLoad()
{
}
public void VF10GACAssembly_OnRefresh()
{
}

At object level:

public void VF1010AssemblyName_OnLoad()
{
      Button button = new Button();
      string typeName = button.GetType().ToString();
      activity.SetControlValue("VF1010AssemblyName", typeName);
}
Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X