Using VS2008sp1, I’m publishing Web app to a separate IIS7.5 server. It’s been ok for a while, but hit this strange scenario:
-Created a class file that generates its own DLL.
-works fine locally
-When publish to server, the older DLL file is there along with all the other newer files (based on time stamp). The application dies when it tries to execute the new class method (it knows of the correct method call, but cant find the method. e.g method not found: class.method() )
-turned off IIS service. Deleted DLL file, republished: still showed older DLL (???)
Its obviously cached / protected somewhere, but how do I get around this an publish all as a group? Do I need to restart IIS everytime?
Usually this is a problem with the difference in the time on your machine and on the server.
If your machine is running ahead by a little bit then visual studio won’t overwrite some of the files on the server during a publish.
You’re best bet is to delete everything on the server, then publish. Or, get the clocks in sync. However, even then sometimes things like resource files still won’t get published correctly.
VS tries to be a little too intelligent here.
Another thing to do is check the “Delete all existing files prior to publish” box if it’s available.