Assemblies.config files: Difference between revisions

From OPC Labs Knowledge Base
No edit summary
Line 4: Line 4:


= Background =
= Background =
When NuGet packages are referenced in .NET Framework, and their dependency packages are pulled in (recursively), it is often the case that different packages end up referencing different versions of the same assembly. Since only a single version of an assembly can be loaded, assembly version redirection (binding redirection) is used to redirect references to different versions of an assembly to a single compatible version. Assembly binding redirections can be specified in .NET Framework configuration files, per-application or machine-wide. In order for this mechanism to function properly, a full set of NuGet packages used by the application must be known. When building an application, common build tools (such as Visual Studio) provide a way to automatically determine the "closure" of the assembly binding redirections needed for the application, and are capable of generating the application configuration file with all necessary assembly binding redirections for you.


= The problem =
= The problem =

Revision as of 17:26, 29 May 2022

This article describes the role of the assemblies.config file in QuickOPC.

Note: The mechanism described here applies to QuickOPC 2022.2 or later.

Background

When NuGet packages are referenced in .NET Framework, and their dependency packages are pulled in (recursively), it is often the case that different packages end up referencing different versions of the same assembly. Since only a single version of an assembly can be loaded, assembly version redirection (binding redirection) is used to redirect references to different versions of an assembly to a single compatible version. Assembly binding redirections can be specified in .NET Framework configuration files, per-application or machine-wide. In order for this mechanism to function properly, a full set of NuGet packages used by the application must be known. When building an application, common build tools (such as Visual Studio) provide a way to automatically determine the "closure" of the assembly binding redirections needed for the application, and are capable of generating the application configuration file with all necessary assembly binding redirections for you.

The problem

The solution

More

Related reading: