6

We're using Subversion (via TortoiseSVN) and Visual Studio 2010 to deploy our website. We have a dedicated account where we do a SVN update, then a FTP publish to our live server. Unfortunately, sometimes when we publish, CSS and Javascript files that have changed don't get pushed. This isn't a caching issue, because we've checked the server and the files actually haven't changed. There's no failures in the publish process to indicate that the files didn't go. If we make a trivial change to them (adding a space, for instance), they'll publish just fine.

Any suggestions?

Edit: Some thoughts I had, but I'm not sure how to test: Could it be possible that if one person modifies a file but doesn't check it in (Timestamp A), and someone else does a publish (Timestamp B), that when the file is later checked in and updated on the server (Timestamp C), Visual Studio sees that B > A and ignores C, so it thinks it doesn't need updating?

Bobson
  • 13,498
  • 5
  • 55
  • 80
  • Perhaps I'm not understanding, but like your edit says, if someone checks out a file and makes changes, but never checks those changes in, then publish wouldn't be aware of the changes; therefor ignoring the file(s). Which is what you would want of course. – Betard Fooser Dec 05 '11 at 18:33
  • @BetardFooser, Good point. I left out a step there. I just clarified it. – Bobson Dec 05 '11 at 18:53
  • I can confirm this problem in a single user scenario publishing directly from Visual Studio. I can make a change to a JavaScript file and that change is not uploaded to the server through an FTP publish. The timestamp on the local file is later than the time stamp on the server as expected. The workaround of using the delete all files on each publish option is the only way to ensure everything is actually published, but this can significantly increase the time to publish. – Jeremy Nov 28 '12 at 22:20

1 Answers1

3

I have the exact same problem with VS2010 and .js files and FTP publish except I am using VSS.

Sometimes certain files do not get published after making a minor change.

What I have been doing is deleting them from the server prior to publishing. I tried adding or removing a newline at the end of each file and that seems to work and is much faster than deleting the files.

With the two prior solutions or workarounds a file could be missed.

Another (not very time efficient but possibly the best) solution is to select the publish option "Delete all existing files prior to publish" but this greatly increases my publish time from a few minutes to over thirty minutes.

Also, I am having this issue when I am the only one working on the project.

I know this isn't really an answer but its my first post here and I am not sure how to reply to a post.

EDIT: My workaround (hopefully a better solution is found) is to delete all .js files on the server. This increases my publish time a little but not as much as using the "Delete all existing files prior to publish" option.

Soenhay
  • 3,958
  • 5
  • 34
  • 60
  • I can add a comment here though. – Soenhay Apr 17 '12 at 21:34
  • Welcome! Yeah, you can only add comments to your own questions, your own answers, and answers to your questions until you've reached 50 reputation. Then you can comment on anything. – Bobson Apr 18 '12 at 17:28
  • As far as the answer you've provided, I'm glad to see that I'm not alone in having this problem. I've upvoted it, since it's a good summary of workarounds and it eliminates SVN from the equation, but I'm not going to accept it yet since it isn't really an explanation or a general fix. If you have a script I can call as a build event to automatically add a newline to each file, I'd be willing to accept that as an answer, but having to do it by hand is a major pain. – Bobson Apr 18 '12 at 17:34
  • I'm having this same problem with Flash SWF files not being published. The only reasonable workaround is to delete the file before publishing, but at that point, I may as well just copy the updated file by hand. And deleting the file doesn't work anyway, it still won't publish it, despite being marked as "content". – Triynko Nov 20 '13 at 17:47