Cruise Control CCNET字符串未被识别为有效DateTime

时间:2016-08-05 09:52:44

标签: datetime tfs cruisecontrol.net ccnet-config

我写的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: (?&lt;file_revision&gt;\S+) View: (?&lt;view_name&gt;.+) Branch Revision: (?&lt;branch_revision&gt;\S+).\nAuthor: (?&lt;author_name&gt;.*) Date: (?&lt;date_string&gt;.*) \w+\r\n(?&lt;change_comment&gt;.*)</fileHistoryRegEx>
&#13;
&#13;
&#13;

上建议的正则表达式

cruisecontrolnet.org/projects/ccnet/wiki/StarTeam

喜欢

&#13;
&#13;
<fileHistoryRegEx>?m:Revision: (?&lt;file_revision&gt;\S+) View: (?&lt;view_name&gt;.+) Branch Revision: (?&lt;branch_revision&gt;\S+)Author: (?&lt;author_name&gt;.*?) Date: (?&lt;date_string&gt;\d{01,2}/\d{1,2}/\d\d \d{1,2}:\d\d:\d\d (A|P)M).*\n(?s:(?&lt;change_comment&gt;.*?))-{28}</fileHistoryRegEx>
&#13;
&#13;
&#13;

给了我异常&#34;未检测到的代码&#34;在这个节点上。

这是我的配置文件。

&#13;
&#13;
<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;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

最后,我安装Windows 10而不是Windows 7,设置Windows界面的英语(最初是俄语)并更改我的region formats

错误消失了。