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.
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.
Written by Lyle Luppes.