Hi,
The following error came while compiling a program.
"The command “CopySourceFromLibSrcBefore.cmd WhenTask” has stopped with the code 9009. (MSB3073).
The way it is set under the Project Options for the source program solution
Project options
Under compiling tab
Export_Joliciel_Classes =>1;ABCLinkMode=>1;ABCDllMode=>0
Under Build Events Tab
Pre-build event command line: CopySourceFromLibSrcBefore.cmd WhenTask
Post-build event command line: CopySourceFromLibSrcAfter.cmd
For some reason I’ll like to know what I did wrong to get this error. I might have this error once before many years ago, I do not remember. I’ll like to know if there’s anyone that has encountered this error and how they were able to solve it. I’m using these Pre and Post build on every class project that I’m working on. This is happening on one of the class projects.
About these batches command files, for the Pre-build command it copies the working source code of the class to the Clarion 11 accessory LibSrc folder. The second one is used to copy files to another computer, backup and for version control.
9009 id the command is not recognized as an internal or external program
Sounds like either the .cmd file is missing or can’t be found, or something the cmd file is executing doesn’t exist or is an invalid command.
1 Like
The strange thing I’m using the same command lines since 2012 on the Pre and Post build over this particular class and many other classes too. You are making me think. I remember once I had a compiler error within the declaration of some corrupted file, the cause I had to rebuild it line by line; thereafter I was able to compile without error.
While searching the error, I find a way to make the batch file that was found in each class folder generic. After that I’ve removed the batch file from the folders and moved it to the accessory/bin. The error did not come back, I am still wondering why this has occurred even though the calling file was present within the folder where it is called. Now with the generic one it is in the accessory/Bin file and the call to the file works.
Thank you, Rick
Have had the same error several times.
I have learned that if I add full path and put my post build command in quotes it run without any error.
/Niels
1 Like
Good things to know, I’ll remember that, thank you for your experieence. At the moment all my classes projects the batch files on pre and post buid are working.
I hit this same error today.
I discovered that MsBuild was changing the current directory " CD’ing " if you will to a subfolder .\Src
I found a work around of using a variable for the command
<PropertyGroup>
<PreBuildEvent>"$(SolutionDir)\PreCMPL.cmd"</PreBuildEvent>
<PostBuildEvent>"$(SolutionDir)\PostCMPL.cmd"</PostBuildEvent>
</PropertyGroup>
But it was still problematic in that at the end of the compile, ClaRunX.DLL and several other DLLs were being copied into .\Src
I tried changing folders in the PreBuildEvent, but that didn’t help.
After a lot of digging I discovered what was controlling the problem
It was an entry in my .RED
*.* = .\Src
Changing that to
*.* = ., .\Src
Fixed the entire problem
4 Likes
Good thing to know, thank you sharing.