I'm developing COM Interoperable classes using Visual Studio 2008. And consuming these classes on Visual FoxPro 9.0 When I compiled the class library it is registering after compilation.
On Visual FoxPro I'm creating object with this code piece on Command window:
newObj = CREATEOBJECT("CemT.Deneme.ClassTest")
When I wanted to chage Class Library on Visual Studio I can't compile and register the dll again. It gives me this error:
Unable to copy file "obj\Debug\clCOMTest.dll" to "bin\Debug\clCOMTest.dll". The process cannot access the file 'bin\Debug\clCOMTest.dll' because it is being used by another process.
With this error I would have to quit VFP and start again. Before creating object I'm compiling the Class Library on Visual Studio. Then I can use the latest version of dll.
This looks very normal because of VFP using the dll but is there any way to do this without restarting VFP?
In VFP, have you tried
RELEASE LIBRARY {your dll file}
or, per documentation, you can clear ALL API libraries by
SET LIBRARY TO
(without any specific library name) to clear them