我写的ccnet.config文件应该在TFS源代码控制服务器上的每次checkin上构建我的项目。当我运行ccnet.exe时,我得到了一些错误:源控制失败(GetModifications):字符串未被识别为有效的DateTime。我认为问题出在我的计算机日期格式中,因此我将其更改为screenshot of my windows date format setting
没有任何改变。然后我看到了这个 post
并且认为我可能应该在fileHistoryRegEx标记中为Date提供正则表达式。但是当我在配置文件中粘贴默认正则表达式时,
github.com/ccnet/CruiseControl.NET/blob/master/project/core/sourcecontrol/StarTeam.cs 喜欢
<fileHistoryRegEx>^Revision: (?<file_revision>\S+) View: (?<view_name>.+) Branch Revision: (?<branch_revision>\S+).\nAuthor: (?<author_name>.*) Date: (?<date_string>.*) \w+\r\n(?<change_comment>.*)</fileHistoryRegEx>
&#13;
或
上建议的正则表达式cruisecontrolnet.org/projects/ccnet/wiki/StarTeam
喜欢
<fileHistoryRegEx>?m:Revision: (?<file_revision>\S+) View: (?<view_name>.+) Branch Revision: (?<branch_revision>\S+)Author: (?<author_name>.*?) Date: (?<date_string>\d{01,2}/\d{1,2}/\d\d \d{1,2}:\d\d:\d\d (A|P)M).*\n(?s:(?<change_comment>.*?))-{28}</fileHistoryRegEx>
&#13;
给了我异常&#34;未检测到的代码&#34;在这个节点上。
这是我的配置文件。
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="WebApplication">
<workingDirectory>C:\Users\Ilovemycat\Source\Workspaces\Selukova\Development\WebApplication\</workingDirectory>
<artifactDirectory>C:\Users\Ilovemycat\Source\Workspaces\Selukova\Development\WebApplication\BuildArtifacts\</artifactDirectory>
<webURL>http://localhost/ccnet/ViewFarmReport.aspx</webURL>
<modificationDelaySeconds>30</modificationDelaySeconds>
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="false">
<executable>C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.exe</executable>
<server>server</server>
<username>username</username>
<password>password</password>
<domain>domain</domain>
<project>$/Selukova/Development/WebApplication</project>
<workingDirectory>C:\Users\Ilovemycat\Source\Workspaces\Selukova\Development\WebApplication\</workingDirectory>
<cleanCopy>false</cleanCopy>
<workspace>WS-STUDENT12</workspace>
<culture>en-US</culture>
<deleteWorkspace>false</deleteWorkspace>
</sourcecontrol>
<triggers>
<intervalTrigger name="continuous" seconds="30" buildCondition="IfModificationExists" initialSeconds="30"/>
</triggers>
<tasks>
<msbuild>
<executable>C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe</executable>
<workingDirectory>C:\Users\Ilovemycat\Source\Workspaces\Selukova\Development\WebApplication\</workingDirectory>
<projectFile>WebApplication\WebApplication.sln</projectFile>
<buildArgs>/p:Configuration=Debug /v:diag</buildArgs>
<targets>Build;Test</targets>
<timeout>30</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
</msbuild>
</tasks>
</project>
</cruisecontrol>
&#13;