Msbuild和SVN更新 [英] Msbuild and SVN update
问题描述
我想编写一个简单的任务,该任务将更新并提交每晚构建到SVN的源代码.我在msbuildtasks.tigris.org页面上,下载了dll的文件,但我不知道如何编写.您能提供一些基本样本吗?
I want to write a simple task which will update and commit source code that was Nightly build to SVN. I was on the msbuildtasks.tigris.org page, and downloaded the dll's but I have no idea how to write it. Could you please provide some basic samples?
推荐答案
以下是一个示例(摘自MSBuild社区任务版本):
Here is an example (taken from the MSBuild Community Tasks Build) that does exactly that:
<ItemGroup>
<CommitFiles Include="www\index.html" />
<CommitFiles Include="www\MSBuild.Community.Tasks.Nightly.zip" />
<CommitFiles Include="www\MSBuild.Community.Tasks.Nightly.msi" />
</ItemGroup>
<SvnCommit Targets="@(CommitFiles)" Message="AutoBuild"
Username="$(CommitUser)" Password="$(CommitPassword)">
<Output TaskParameter="Revision" PropertyName="Revision" />
</SvnCommit>
当然,您需要导入MSBUild社区任务才能使其工作:
Of course you need to import the MSBUild Community tasks for this to work:
<Import Project="MSBuild.Community.Tasks.Targets" />
此示例仅提交了几个文件,但是通过在任务上设置Targets属性,可以轻松实现更多目标.
This example is only committing a couple of files, but by setting the Targets property on the task it could easily be more.
这篇关于Msbuild和SVN更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!