C# 使用CruiseControl.NET和MSBuild发布网站

C# 使用CruiseControl.NET和MSBuild发布网站,c#,.net,msbuild,cruisecontrol.net,publish,C#,.net,Msbuild,Cruisecontrol.net,Publish,我正在尝试设置自动从SVN()下载新版本并将其发布到beta目录 这是CruiseControl.NET配置文件,涉及: 我还尝试从控制台手动运行MSBuild,以测试它是否单独工作。但我无法获得正确的输出(可发布到web上)。我试过: C:\Windows\Microsoft.NET\Framework\v4.0.30319>MSBuild.exe C:\CI\WORKING\WashMyCarHomepage\WashMyCarHomepage.csproj /property:Out

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

这是CruiseControl.NET配置文件,涉及:

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

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

如何解决这个问题?

在与这个问题进行长期斗争后,我确实找到了解决方案。 我提供了整个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>

C:\CI\WORKING
C:\CI\BUILD
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\CI\WORKING
WashMyCarHomepage\WashMyCarHomepage.csproj
/p:OutputPath=bin/p:Configuration=Deploy Dev/p:DeployOnBuild=True/p:DeployTarget=MSDeployPublish/p:MsDeployServiceUrl=localhost/p:AllowUntrustedCertificate=True/p:MSDeployPublishMethod=WMSvc/p:createpackageonnpublish=True/p:UserName=windowusername/p:Password=WindowsPassword
900
C:\ProgramFiles(x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll
C:\Program Files(x86)\VisualSVN Server\bin\svn.exe
https://localhost:8443/svn/project/trunk
svn_用户名
svn_密码
真的
真的
真的
https://localhost:8443/svn/project/tags

请注意,“部署开发人员”是在VisualStudio中设置的配置。

您是否在执行上述步骤之前下载了代码?XML元素也区分大小写。因此,如果您使用CCValidator.exe检查配置,可能就是问题所在。
WashMyCarHomepage\WashMyCarHomepage.sln
WashMyCarHomepage\Repository\Repository.csproj
WashMyCarHomepage\WashMyCarHomepage\WashMyCarHomepage.csproj
<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>