Salesforce

Accessing assemblies from another project.

« Go Back

Information

 
TitleAccessing assemblies from another project.
URL NameAccessing-assemblies-from-another-project
Article Number000126503
EnvironmentProduct: OpenEdge
Version: 11.7.x
OS: Windows
Other: Progress Developer Studio for OpenEdge (PDS for OpenEdge)
Question/Problem Description
An application is made up of multiple projects within one workspace. .NET assembles are located within one project. How can those assemblies be made available to other projects in the workspace, so that multiple copies of the assemblies do not have to be placed into each project? To organize assemblies how can assemblies to placed in subdirectories within a project?
 
Steps to Reproduce
Clarifying Information
Assemblies from various producers are to be placed in different subdirectories, within a project.
 
Error Message
Defect Number
Enhancement Number
Cause
Resolution
In any of the projects in which the assembles are not located, Update project->properties->Progress OpenEdge->Assemblies.
Uncheck the checkbox entitled "Use Default". Select the project where the assemblies are located. The assemblies location shows up as platform:/resource/<assembly name>.

Copy the file toolbox.xml from the project where the assemblies reside to the top level directory of the project that needs access to the .NET controls.

In the project where the assemblies reside, add an additional statrup parameter, as follows:
-assemblies <path to the project where the assemblies reside>.

In the project where the assemblies reside, add a file entitled assemblies.config. This points to the subdirectories where the assemblies reside.

The format of assemblies.config is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <probing privatePath="myControls\winforms" />
        </assemblyBinding>
    </runtime>
</configuration>


The value assigned to privatePath is a semi-colon separated string containing subdirectories where assemblies reside. The string can contain up to 9 subdirectory object within the string. The assemblies can be placed in any of the subdirectories listed in the file assemblies.config. The subdirectories must be relative to the location of the assemblies.xml file. This is generally in the main directory of a project.

In addition, it is important to be mindful of run/debug configuration settings, on the Startup tab. This is in reference to the "Use project settings checkbox and the Assemblies directory textbox. These are contained in the box entitled Common Language Runtime (.NET). According to the documentation describing the "Use project setting" checkbox and the Assembies directory textbox:

Use project settings:
If checked, causes the configuration to use the same settings as the project (specified on the Main tab) for the assemblies directory and for loading of the Common Language Runtime.

Assemblies directory:
Optionally specifies the directory (full path or  path relative to the working directory) containing the assemblies.xml file and any third-party .NET assemblies. If this field is blank, the working directory for the specified project is assumed. This field is disabled if Use project settings is checked.

Please be mindful of the last line of the Assemblies directory section: This field is disabled if Use project settings is checked. If the Use project settings checkbox is checked, the Assemblies directory textbox contents is disabled (ignored). In that case the directory dlc\bin is the only directory searched for assemblies (along with subdirectories in the privatepath in the assemblies.config file in dlc\bin). If Use project settings is checked, a -assemblies startup parameter must be used assuming the project's assemblies are not in dlc\bin or its subdirectories). The value assigned to -assemblies must be the directory where the assemblies.xml and (optionally) where assemblies.config are located. 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:10 AM

Powered by