Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 136

File Copy Issue - PrecompiledApp.config In Use - How to Combat?

$
0
0

Hi there,

Here's a brief overview of what I'm trying to do.  Our build process currently copies needed files to a network location via a Post-Build script in TFS.  These files are then copied to a website on a different machine.  What happens is that I get a successful build, but when I immediately fire off another build for testing, I get an error that the file PrecompiledApp.config cannot be copied as it is in use.  This is during a Robocopy opearation, called from the script.

I've seen posts that copying the files from network shares to website servers isn't the best way to go.  Others say this is fine.  Those opposed to it offer that the files should be zipped, the .zip file copied, then extracted.  I'm wondering, if the above mentioned file is actually tied up, if the zip method would have any different effect.

I'm running some remote powershell stuff on the site server and I was wondering if there was something I could do to halt IIS, copy the files, then start back up.  I've tried stop/start-website, iisrestart, etc, but nothing seemed to help.  I'm running IIS 8.5 and I ran across start-webcommitdelay so I thought I would give that a try.  I'm not even sure if it applies, but I'm running out of ideas.  So, the start-webcommitdelay seemed to fire from the script.  The copy seemed to go OK, but the stop-webcommitdelay errored - something like couldn't execute due to condition of the object.

It doesn't seem that these cmdlets will help anyway.  I commented them from the post-build script, ran the start-webcommitdelay on the site server then ran my build = same issue.

This may not and probably isn't the best forum for this, but I'm wondering what I can do with PowerShell to completely shut down IIS on the remote machine, then the files would be copied, then I would like to start IIS backup.

Any ideas would be greatly appreciated!!


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>