views:

463

answers:

3

I'm using Visual Studio 2008 SP1 and a web application that I'm trying to publish to a local directory fails even though the project builds ok. It doesn't give any build errors nor does it show anything in the Output window of why it failed:

Publishing folder bin...

========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

As you can see from above, it fails on publishing the bin folder. Anyone have any clue why it's doing this and what I can do to resolve it? I should also mention that I can publish other web apps just fine, only this one is having the issue.

+1  A: 

You may have an issue if one of the DLL's in the BIN is in use by another process in your publish location. I'm guessing that you won't be able to manually delete the file if you browse to that location directly.

You can try to stop IIS on the box you are publishing to for this application pool and see if that yields a different result. Just keep in mind that doing so will make the site inaccessible until you've started IIS again for the application pool.

RSolberg
I'm just trying to publish to a local directory on my dev box, then I'll ftp it up to the prod site, so downtime isn't an issue. Stopping IIS doesn't make any difference, publish still fails on the bin directory. Any more ideas?
Justin
+1  A: 

I have had a similar weird anomoly before. A 'Rebuild' as opposed to a build solved the problem in my case.

RR
This is a publish, not a build or rebuild.
Justin
A: 

There may be missing files in your project. This would cause the publish to fail since it cannot publish files that no longer exist.

Kevin