0

I've set up a Visual Studio publish button for my application, including the "remove all files before publishing" setting. It looks like it's not succeeding in removing the files, though (possibly they're still locked, maybe IIS is still serving them?). Sometimes I discover left over, older, files in my testing, and have to remove the by hand.

My current workaround is to delete the site manually, and then do a publish. That kind of sucks, though. I'd like to be able to do a publish in a single click.

Is there a way to set this up? To make sure that all of the files in the directory are removed before publishing a new version of the application?

blueberryfields
  • 757
  • 1
  • 7
  • 17

1 Answers1

2

I've never run into that problem, but if you stop the application pool that the app is running prior to redeployment then that should ensure IIS is not locking the files.

squillman
  • 37,618
  • 10
  • 90
  • 145