Peter McEvoy
2004-04-07 15:17:17 UTC
Folks,
I am using NAnt to build a number of web projects and then to deploy them to
an IIS instance. Occasionally, the deploy fails with a "Cannot Copy
'<file>'. Access to the path '<file>' is denied". where <file> is some
assembly that needs to be replaced.
If I run the deploy again, it will usually work (occasionallt not, but
persistance pays off and it will eventually deploy).
Now I presume this is something to do with the IIS thread accessing the
assembly at the same time that I want to overwrite it.
I do not want to set failonerror="false" as I do actually want to replace
the files.
The same error can happen if I try to delete the remote files before
deploying.
Is this a "feature" of the so-called MS .Net XCopy deploy functionality? Is
there anything that I can do to ensure that the delete and copy will
actually work, as this error is not really making life easy for a hands-off
build and deploy
Cheers
Pete
I am using NAnt to build a number of web projects and then to deploy them to
an IIS instance. Occasionally, the deploy fails with a "Cannot Copy
'<file>'. Access to the path '<file>' is denied". where <file> is some
assembly that needs to be replaced.
If I run the deploy again, it will usually work (occasionallt not, but
persistance pays off and it will eventually deploy).
Now I presume this is something to do with the IIS thread accessing the
assembly at the same time that I want to overwrite it.
I do not want to set failonerror="false" as I do actually want to replace
the files.
The same error can happen if I try to delete the remote files before
deploying.
Is this a "feature" of the so-called MS .Net XCopy deploy functionality? Is
there anything that I can do to ensure that the delete and copy will
actually work, as this error is not really making life easy for a hands-off
build and deploy
Cheers
Pete