Visual COBOL 2.1 for Visual Studio 2010 is reporting locked .dll files when rebuilding solution

Visual COBOL 2.1 for Visual Studio 2010 is reporting locked .dll files when rebuilding solution

Problem:

Customer has a Visual COBOL 2.1 solution that contains many different projects.

The programs within these projects make calls to subprograms that reside in different projects so references are added to the calling programs projects that point to the .dlls output from other projects by doing a direct link to the .dll file itself.

When Visual COBOL is started the solution will be successfully on the first attempt.

Subsequent attempts will fail with a Visual Studio error that the .dll to be built cannot be copied because it is locked by another process.

What is causing this error?

Resolution:

This error occurs because direct references to the .dlls of other projects are being used.
When you add references directly to the .dll instead of to the project itself the build process does not know in what order it should build these files so the .dlls end up getting locked in some cases.

This problem can be resolved by using project references instead of adding references using the Browse button to point directly to the .dll files.

 

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-05-30 11:15
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.