内容文件未使用Visual Studio 2010 FTP发布更新 [英] Content files not updating with Visual Studio 2010 FTP Publish

查看:103
本文介绍了内容文件未使用Visual Studio 2010 FTP发布更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Subversion(通过TortoiseSVN)和Visual Studio 2010来部署我们的网站.我们有一个专用帐户,在该帐户中进行SVN更新,然后将FTP发布到实时服务器.不幸的是,有时在我们发布时,更改的CSS和Javascript文件不会被推送.这不是缓存问题,因为我们已经检查了服务器,并且文件实际上没有更改.在发布过程中没有失败表明文件没有丢失.如果我们对其进行微不足道的更改(例如,添加一个空格),它们将发布就好了.

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.

有什么建议吗?

我有一些想法,但是我不确定如何测试:是否有可能一个人修改了一个文件却没有将其签入(时间戳A),而另一个人进行了发布(时间戳B),当稍后在服务器上签入文件并对其进行更新(时间戳C)时,Visual Studio看到B> A并忽略了C,因此认为不需要更新吗?

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?

推荐答案

除了我使用VSS之外,我对VS2010和.js文件和FTP发布存在完全相同的问题.

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.

我的解决方法(希望找到更好的解决方案)是删除服务器上的所有.js文件.这会稍微增加我的发布时间,但不如使用在发布之前删除所有现有文件"选项那样多.

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.

这篇关于内容文件未使用Visual Studio 2010 FTP发布更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆