Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to debug/fix "File Already Exists" build error 2

Status
Not open for further replies.

grahammiller

Programmer
Apr 4, 2012
4
GB
Help! I'm trying to rebuild an application and late on in the process I get the message "File already exists" and the build fails.

This is a project I've built countless times in the past and I've never seen this problem before. A colleague of mine who also has Foxpro installed can build the same project without the error. I can't find any info on this enywhere - does anyone have a clue please?

I get the same error building using vfp7 and vfp9 (I have both installed) and I'm running on Windows7. I also get the same error rebuilding old versions of the project.
 
One further tip: If you testdrive your code before compiling, either CLEAR ALL or better restart VFP before a build, reason for not being able to overwrite in VirtualStore could also be classes still loaded in memory.

And it's safe to delete those files, as the originals are never touched and still exist in the Program Files folder. Compiling without Recompile all should keep the VirtualStore empty, s ffc classes would not be compiled then, but taken as they are already compiled.

Bye, Olaf.
 
Again, thanks for all this info folks.

The original 'solution' I had from the early posts was to refer to a copy of the FFC folder located on our development server instead of the one in c:\program files. It allowed a rebuild, but I didn't know whether there would be unwanted effects (I don't know where this class is used in the project and GoFish crashes with 'string too long' if I try to search for '_mover').

From Olaf's comments about the HOME reference I can see this might not be a permanent solution anyway.

I have since found that replacing the _movers files in 'c:\program files' with copies from our server FFC folder now allows me to rebuild (with the full 'recompile all' option) without error. I have cleared out all the files in VirtualStore\Program Files\Microsoft Visual FoxPro 7\Ffc and they all get recreated on recompile (previously _movers.vcx was missing). I noted when overwriting the _movers files there was a slight difference in size, so perhaps these had somehow become corrupted..

So I think I can close this off now having learned quite a lot from you all. Many thanks all round!!


 
Olaf,

Another option is to Run VFP as Administrator, compile all the classes.

But...

Even better, from a Best Practices view, is to copy the needed FFC files into your project folder. It doesn't get around the HOME() issue, but they should not hold that reference and it should be removed.

Craig Berntson
MCSD, Visual C# MVP,
 
I know in compiled version the stem of a filename or classlib name is sufficient, so the HOME() path doesn't matter perhaps, but I'm not so sure. At least during development time, it makes it harder to debug.

You could still grant full access rights just to the FFC subfolder, there only is VFP source code in there, no executable or dll being prone to virus infections.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top