views:

1872

answers:

5

I usually use the "Publish" feature in VS 2008 to get the correct files and so on that I can publish to my website. But from time to time publish fails without any good error message at all. I know that it can be a couple of different reasons but I am starting to grow really tired with this now.

Can anyone teach me how to build the website from the command line? As I said it is a MVC project. Can I use the aspnet_compiler for this? What parameters should I use to simulate the same behavior as a "Publish"?

A: 

i got the same problem but i dont know the cause so i cant reproduce it.

but if you create a second MVC Project in your solution and publish that, the other one will start working again too.

at least in my case this worked, hth

marc.d
+1  A: 

I have the same problem occasionally in a normal web project just publishing to a local directory.

So no FP needed and directory permissions never change. It will work sometimes and then just fail. The Output console is useless for trouble shooting. It will say build succeeded and then publish failed on the very next line. End of logging. Thanks for nothing :(

Not having any good message as to why the publish fails is extremely annoying. This is VS 2008, you'd think they can at least provide a hint.

There are 2 things that I have done to get around the problem.

  1. Toggle between the "Replace matching files with local copies" and "Delete all existing files prior to publish" options.

  2. Restart the IDE.

Publishing to a different directory, a clean and then build, and stopping IIS did not work.

yea, but when those two things fails you do not know what to do. I have had some success in changing so it publish to the local webserver also.
Stuck
+1  A: 

I kind of figured this out. Not the fail part but i made a command line build script instead. I blogged about it here.

I had troubles pasteing the code here but all info is in the blog post.

Stuck
A: 

I ran into this same problem. After looking around at the comment's on Stuck's blog link he posted I tried using TortoiseSVN's export function to get a clean copy of the code without the svn admin stuff. Doing a compile and publish worked from there.

Don't know if this is the same as your problem, but we do use SVN, TortoiseSVN, and AnkhSVN here. If you have the same setup it might be worth a shot.

I know this post is coming a bit late for the original question - but this was one of the top results on google so I figured anyone else having this problem might find a bit of luck with what worked for me.

Noaki
+1  A: 

SOLUTION!!!!

Display the output window. VS 2005 - View -> Output.

When you publish it will give you all the errors.

Manish Paranjape