>To all,
>
>in a VFP8 project I created a form tested it and because I needed a little variant of it moved it into a class. I then inserted the class on the first form, tested it and hey..it worked.
>I copied it to a second form made some cosmetic changes and this one worked as well. So far, so good.
>However, when building the exe a message was shown:
>OLE error 0x8002802d: name already exists in the library
>
>This problem did not surface when creating the app. Knowing that only two new screens had made it into the project I checked them and noticed that the formnames were identical.
>I gave the names they should have gotten and it solved the problem.
>
>The question I have is: if VFP(8) is smart enough to detect the problem, why is it then not smart enough to tell me where the problem occured. Just returning the name that caused the problem would have been enough?
>
Because it is not so smart!
>Is there a way to detect this outside the build process?
>
In VFP9 the BUILD process is described in Debug output,
this can help.
Try this:
- clone/backup the project,
- then you can try this program:
projectFile = GETFILE("pjx","Project")
exeFile = FORCEEXT(ADDBS(SYS(2023))+SYS(2015),"exe")
MODIFY PROJECT (m.projectFile) NOWAIT NOSHOW
oIncluded=CREATEOBJECT("COLLECTION")
FOR EACH oFile IN _VFP.ActiveProject.Files
IF oFile.Exclude
LOOP
ENDIF
oFile.Exclude = oIncluded.Add(oFile)
NEXT
LOCAL fileError
WAIT WINDOW "Press Cancel for intercept the error" NOWAIT NOCLEAR
FOR EACH oFile IN oIncluded
TRY
oFile.Exclude = .F.
IF EMPTY(m.fileError)
BUILD EXE (m.exeFile) FROM (m.projectFile)
ENDIF
CATCH TO oErr
fileError = oFile.Name
ENDTRY
NEXT
WAIT CLEAR
? "Error when include ",fileError
>Regards,
>
>Ron