How to disable prerequisites boxing

From OPC Labs Knowledge Base
Jump to navigation Jump to search

As explained in Prerequisites Boxing chapter in the User's Guide, QuickOPC uses “boxing”, a special technique based on file system and registry virtualization, which allows it to transparently load and use dependent software that would otherwise have to be installed (and uninstalled separately).

In some cases it might be necessary or advisable to disable the prerequisites boxing, such as when it collides with some other software on the system. This can be done using settings in the application configuration file, described further below. When you disable the boxing, you are then responsible for installing the appropriate prerequisites onto the disk yourself. Consult the User's Guide for description of the necessary prerequisites.

The configuration file snippets below disable the boxing for all supported prerequisites, using a separate setting for each of them. You can also disable just a specific prerequisite, by using just a subset of the settings.

To disable the boxing in QuickOPC 2016.2, add the following XML snippet under the <configuration> element of your application configuration file:

<appSettings>
    <add key="OpcLabs.EasyOpc.Implementations.Native.Assemblies.EnableVC140RedistBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.Internal.OpcPSBoxing.EnableOpcCorePSBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.UA.Toolkit.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>
</appSettings>

Please refer to Microsoft documentation for details on the application configuration files, the diagnostic switches, the trace listeners, and so on. The application configuration file needs to be named the same as your application, with an added “.config” extension, and placed alongside the application. For example, for “MyApp.exe”, the configuration file is “MyApp.exe.config”. Note that the development tools sometimes provide “shortcuts” for the naming and placing procedure. For example, Visual Studio C# projects contain an app.config file, which becomes the application configuration file automatically – Visual Studio copies it to the output folder and renames it appropriately.

Updated: Same instructions are still valid for subsequent QuickOPC versions up to 2018.3. Starting with QuickOPC 2019.1, use:

<appSettings>
    <add key="OpcLabs.EasyOpc.Implementation.Native.Assemblies.EnableVC140RedistBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.Internal.OpcPSBoxing.EnableOpcCorePSBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.UA.Toolkit.ClientServer.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>
</appSettings>

Updated: Starting with QuickOPC 2020.3, use:

<appSettings>
    <add key="OpcLabs.EasyOpc.Implementation.Native.Assemblies.EnableVC142RedistBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.Internal.OpcPSBoxing.EnableOpcCorePSBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.UA.Toolkit.ClientServer.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>
</appSettings>

A full file that contains only the configuration settings mentioned here, and nothing else, looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="OpcLabs.EasyOpc.Implementation.Native.Assemblies.EnableVC142RedistBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.Internal.OpcPSBoxing.EnableOpcCorePSBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.UA.Toolkit.ClientServer.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>
  </appSettings>
</configuration>