4

我正在尝试将CruiseControl.NET设置为自动从 SVN ( VisualSVN_Server )下载新版本并将其发布到 beta 目录。

这是有关MSBuild的 CruiseControl.NET 配置文件:

<msbuild>
    <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
    <workingDirectory>C:\CI\WORKING</workingDirectory>
    <projectFile>WashMyCarHomepage\WashMyCarHomepage.csproj</projectFile>
    <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag /p:WebProjectOutputDir=C:\inetpub\wwwroot.beta</buildArgs>
    <targets>Build;Test</targets>
    <timeout>900</timeout>
    <logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
  </msbuild>

CruiseControl.NET 成功运行 MSBuild,但 MSBuild 失败并显示:

standard-error stream closed -- null received in event
standard-output stream closed -- null received in event
process exited event received

我还尝试从控制台手动运行 MSBuild 以尝试它是否单独工作。但我无法获得正确的输出(可发布到网络)。我试过:

C:\Windows\Microsoft.NET\Framework\v4.0.30319>MSBuild.exe C:\CI\WORKING\WashMyCarHomepage\WashMyCarHomepage.csproj /property:OutDir=C:/CI/TEST;Configuration=Release /t:Publish

但是该项目被“跳过不可发布的项目”跳过。

我有以下解决方案的结构:

WashMyCarHomepage\WashMyCarHomepage.sln
WashMyCarHomepage\Repository\Repository.csproj
WashMyCarHomepage\WashMyCarHomepage\WashMyCarHomepage.csproj

我该如何解决这个问题?

4

1 回答 1

2

经过与这个问题的长期斗争,我确实找到了解决方案。我提供了整个 CruiseControl.NET 配置文件。

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
  <project name="Aucis">
    <workingDirectory>C:\CI\WORKING</workingDirectory>
    <artifactDirectory>C:\CI\BUILD</artifactDirectory>
    <triggers>
      <intervalTrigger name="CI Trigger" seconds="120" buildCondition="IfModificationExists"/>
    </triggers>
    <tasks Name="Clean">
      <msbuild>
        <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
        <workingDirectory>C:\CI\WORKING</workingDirectory>
        <projectFile>WashMyCarHomepage\WashMyCarHomepage.csproj</projectFile>
        <buildArgs>/p:OutputPath=bin /P:Configuration=Deploy-Dev /P:DeployOnBuild=True /P:DeployTarget=MSDeployPublish /P:MsDeployServiceUrl=localhost /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMSvc /P:CreatePackageOnPublish=True /P:UserName=WindowsUsername/P:Password=WindowsPassword</buildArgs>
        <timeout>900</timeout>
        <logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
      </msbuild>
    </tasks>
    <sourcecontrol type="svn">
      <executable>C:\Program Files (x86)\VisualSVN Server\bin\svn.exe</executable>
      <trunkUrl>https://localhost:8443/svn/project/trunk</trunkUrl>
      <username>svn_username</username>
      <password>svn_password</password>
      <autoGetSource>true</autoGetSource>
      <cleanCopy>true</cleanCopy>
      <revisionNumbers>true</revisionNumbers>
      <tagBaseUrl>https://localhost:8443/svn/project/tags</tagBaseUrl>
    </sourcecontrol>
  </project>
</cruisecontrol>

请注意,“Deploy-Dev”是在 VisualStudio 中设置的配置。

于 2013-03-28T10:32:37.707 回答