Deploying application with VisualAPL .dll

General discussions related to APLNext's VisualAPL.

Moderators: Tech Support, phpbb_admin

Deploying application with VisualAPL .dll

Postby Chris McIntosh » October 5th, 2011, 1:12 pm

I'm having a problem deploying an application with a VisualAPL component to a web server.

The error I get is "Could not load file or assembly 'AplNext.APL.LegacyOps, Version=1.0.7001.44555, Culture=neutral, PublicKeyToken=b159a1a8ff3f8ec0' or one of its dependencies. The system cannot find the file specified."

When I investigate, I see that AplNext.APL.LegacyOps is in the Global Assembly Cache. I further see that according to Microsoft, ... 80%29.aspx, "You cannot add references from the Global Assembly Cache (GAC), as it is strictly part of the run-time environment ... If you deploy an application that contains a reference to a custom component that is registered in the GAC, the component will not be deployed with the application, regardless of the CopyLocal setting."

Can you give me some advice as to how to deploy this application?


Chris McIntosh

Postby Chris McIntosh » October 5th, 2011, 2:33 pm

OK, problem solved. I should have looked into this a little more extensively before I posted.

I was able to find the complete path of the AplNext.APL.LegacyOps.dll file by looking in the Properties section for this reference. I was then able to copy it to the bin subdirectory of the application on the server. Things are now working fine.

Chris McIntosh

GAC is an alternative to local dll installation

Postby joe_blaze » November 28th, 2011, 3:18 pm

Hi Chris,

When a .Net application is to be deployed all dependencies must be identified and the associated files (usually dll and exe) must be installed onto the target hardware.

Using the .Net Global Assembly Cache to house dependent components of an application system may be convenient because its location is 'known', simplifying references to objects in it.

Adding assemblies (dlls) to the GAC requires that the assemblies have 'strong' names. See here for 'strong' name definition:

In addition administrator priviledges may be required to effectively modify the GAC of a target machine.

Thus most .Net applications copy all dependencies to the application subdirectory containing the exe for the project instead of using the GAC.

In Visual Studio one can add a deployment project to a solution (Other Project Types > Setup & Deployment including a Setup Wizard) which may be used to create a Microsoft installer (.msi file) for a solution. This wizard will identify the dependencies, assure they are included in the installer as well as provide other deployment options for the developer to utilize.

Joe Blaze
Posts: 383
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Postby Chris McIntosh » December 1st, 2011, 5:02 pm

Hi, Joe,

I think your advice is correct, however I think it only applies when installing an application to a desktop. In this particular case, I was publishing a web application to a web server.

Chris McIntosh

Return to VisualAPL

Who is online

Users browsing this forum: No registered users and 1 guest