Precedents:
Using visual basic express 2010 on windows 7 pro 64b.
Solution one CLB is a class library with multiple projects.
Solution two WFA is a windows form application with a reference to one of the CLB projects .dll located in the bin release folder (not the debug folder).
Problem:
When CLB gets modified and build, the WFA shows for the class on the .dll:
“Type “MyClass” is not defined”
and at description:
“Unable to load referenced library “MyLibraryDllPath”. The process cannot access the file because it is being used by another process”
Bad solutions:
This problem gets solved by either deleting and adding again the reference or by closing the WFA in which case when reopen the reference is good again.
I know that:
When referencing the .dll on the bin debug folder doesn’t present this problem after the . dll builds again.
Solutions with multiple projects don’t create a .dll on the debug folder just on the release one.
Questions:
How do I fix this problem?
Why a reference to the .dll on the debug folder doesn’t generate this problem after the .dll buids again and references to the release folder do?
Why multiproject solutions doesn’t create a .dll on the debug and single project solutions do?
Why do I get the message “…cannot access the file because because it is being used by another process”?
What is that other process using it?
cess the file because because it is being used by another process”?
What is that other process using it?

show your code and i think after using that object your are not releasing that object like
object_name=nothing
or
object_name.dispose()

This article has been dead for over six months. Start a new discussion instead.