简体   繁体   English

内容文件未使用Visual Studio 2010 FTP发布进行更新

[英]Content files not updating with Visual Studio 2010 FTP Publish

We're using Subversion (via TortoiseSVN) and Visual Studio 2010 to deploy our website. 我们使用Subversion(通过TortoiseSVN)和Visual Studio 2010来部署我们的网站。 We have a dedicated account where we do a SVN update, then a FTP publish to our live server. 我们有专门的帐户,我们进行SVN更新,然后FTP发布到我们的实时服务器。 Unfortunately, sometimes when we publish, CSS and Javascript files that have changed don't get pushed. 不幸的是,有时当我们发布时,已经改变的CSS和Javascript文件不会被推送。 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? 编辑:我有一些想法,但我不确定如何测试:如果一个人修改文件但没有检查(时间戳A),而其他人做了发布(时间戳B),是否有可能,当文件稍后在服务器上签入并更新(时间戳C)时,Visual Studio会看到B> A并忽略C,所以它认为它不需要更新?

I have the exact same problem with VS2010 and .js files and FTP publish except I am using VSS. 我有VS2010和.js文件和FTP发布完全相同的问题,除了我使用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. 编辑:我的解决方法(希望找到更好的解决方案)是删除服务器上的所有.js文件。 This increases my publish time a little but not as much as using the "Delete all existing files prior to publish" option. 这会稍微增加我的发布时间,但不会像使用“删除发布前的所有现有文件”选项那样多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM