如何在不编译、不复制SVN文件的情况下发布完整的网站
显然,DNN 安装不喜欢预编译(那样它们将无法找到任何本地化字符串)。我们的安装被安全地放入 SVN 中,这意味着我不能只复制整个目录。要发布所有内容,我需要复制整个网站目录,不包含 SVN 文件和目录。到目前为止,我一直在搞乱旧的 DOS 命令,这既耗时又容易出错。
有人可以帮助我使用 MS 构建的脚本或步骤来执行此操作吗?或者我可以使用默认的 Visual Studio 2010 命令来执行此操作吗?
注意:这是一个网站,而不是网络应用程序。
Apparently, DNN installations do not like to be precompiled (they won't be able to find any localized strings then). Our installation is safely put in SVN, which means I cannot just copy the whole directory. To publish everything, I need to copy the whole website directory without the SVN files and directories. So far, I've been messing with good old DOS commands, which is time consuming and error prone.
Can someone help me to an MS-Built script or step to do just this? Or can I do this using default Visual Studio 2010 commands?
Note: this is a website, not a web application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需从源代码管理中
svn export
目录,这将为您提供一个干净的副本,其中不含.svn
内容。Just
svn export
the directory from source control, which will give you a clean copy without the.svn
stuff in it.Visual Studio
->解决方案资源管理器
-><网站>
-><右键单击>
->发布网站
或复制网站
Visual Studio
->Solution Explorer
-><web site>
-><right click>
->Publish Web Site
orCopy Web Site
如果您有兴趣使用 MSBuild 自动化此操作,那么您可以使用如下所示的方法来实现。
因此,当我创建
FilesToCopy
项时,我会排除任何 .svn 文件夹下的所有文件。然后我只需在 CopyFiles 目标内执行复制。If you are ever interested in automating this with MSBuild then you can do that with something like the following.
So when I create the
FilesToCopy
item I exclude all the files under any .svn folder. Then I just perform the copy inside the CopyFiles target.