Copying DLLs during post-build

Topics: Developer Forum
Coordinator
Feb 22, 2007 at 3:38 PM
Edited Feb 22, 2007 at 3:39 PM
Copied message from my blog...

Hi there, I am trying to use your nice and handy template, but I can’t get it working so that it updates the .dll files in the GAC folder inside the .wsp file.

I have a number of .cs files added under Controls, and when I build the project the result(a .dll file) is placed in the bin\debug folder. Then in post-build i copy the .dll file to the GAC, but it is newer updated in the .wsp file. If I remove the file and build a new .wsp file, witch does not contain my .dll file, and i afterwards add the .dll again, an the builds the .wsp file again, it is updated inside the .wsp file. Because of that I think it is somthing about overwriting the existing .dll file in the .wsp that fails, but i can’t find out fixing it!

Please help

/Thomas
Coordinator
Feb 22, 2007 at 3:39 PM
Edited Feb 22, 2007 at 3:40 PM
Thomas,

It sounds possibly like a timing problem. In the post-build it copies the DLL, but it has finished copying by the time the script is looking for the DLL and so does not get included.

You might try this at the begining of the ddf script...

Dim starttime, exittime, x
x = 0
starttime = timer
exittime = starttime + 5
do while timer < exittime
x= x + 1
loop

this should give it 5 seconds bore it starts...I haven't tested it, but you get the idea

Vince