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



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?


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.



Comment List