Posted by: lluppes | September 15, 2012

Publish Failing in VS2012?

I’ve been working with an MVC4 project in VS2012 for a while, publishing to our development and test servers. I set up a publication profile for my local machine, my development server, and my test server and could use each of them with no problems.  Fortunately, the entire project was under source control.  My problems began when I updated some images and decided to rename a few images so that I wouldn’t have problems with users seeing old images from their cache.  I renamed the images and then updated the views that referenced them.

VS2012 Publish Error

I was able to publish OK the first time after those renames, but then when I closed the project and reopened the project, then the publish option did not work AT ALL.  Instead, I just get this (NOT!) helpful error: “Exception in executing publishing: No such interface supported”

I searched around and found a few other people that have run into this and submitted the problem to Microsoft, but it’s not reproducible so there were no solutions.

After a lot of testing and trials, it seems that the problem has to do with the existence of the solution .suo file.  My solution file is named “[ProjectName].sln”, and the offending file is named “[Project].v11.suo”.  The suo file is created when the solution is closed.  If that file exists when my solution is opened, then I get the publication error above.  If I delete the file and reopen the solution, I am able to publish just fine.  When I closed the solution, the file gets created again and next time I get the publication error.  Eventually the problem goes away and then I don’t have to delete the suo file…  very strange.  Hopefully Microsoft can find an answer to this problem.

So – if you have this problem – delete the suo file BEFORE you open the solution and that may solve your problem.

Lyle

Written by .

Advertisements

Responses

  1. Lyle, thank you so much. I’m developing a .NET 4 web application in Visual Studio 2012 and need to release a new version to a customer – I’d have been banging my head against a brick wall for hours without this! There is an open MS Connect issue on this and your blog has been linked to as a workaround.

    Thanks again – invaluable.

    • Glad to hear it helped you out. This one plagued me several times so once I figured it out I thought I’d publish this and hope it helped somebody else out.

  2. The connect case is http://connect.microsoft.com/VisualStudio/feedback/details/766081/cannot-publish-web-application-in-vs-2012

    • Looks like this may have been fixed with a recent update of the Web Developer Tools – thanks for the info, Jan!

  3. Thank you!! I too was stumped on this one. Definitely needs to be addressed by MS.

  4. Thanks for posting this – this problem just appeared on my co-workers machine and you’ve saved us some time and headaches! Cheers.

  5. i am a persian programmer and say to u from persian Empire very very tanx

  6. […] https://blog.luppes.com/2012/09/15/publish-failing-in-vs2012/ […]

  7. […] https://blog.luppes.com/2012/09/15/publish-failing-in-vs2012/ […]


What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: