问题描述
我想设置 CruiseControl.NET 自动从SVN下载新版本( VisualSVN_Server ),并将其发布到测试版的目录。
I am trying to set up CruiseControl.NET to automatically download a new version from SVN (VisualSVN_Server) and publish it to the beta directory.
这是关于CruiseControl.NET配置文件的MSBuild :
THis is the CruiseControl.NET configuration file concerning MSBuild:
<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的失败,:
CruiseControl.NET runs MSBuild successfully, but MSBuild fails with:
standard-error stream closed -- null received in event
standard-output stream closed -- null received in event
process exited event received
我也试图从一个控制台手动运行MSBuild的尝试是否单独工作。但我无法得到适当的输出(可发布到Web)。我想:
I was also trying to run MSBuild manually from a console to try whether it works alone. But I was unable to get a proper output (publishable to the web). I tried:
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
不过,该项目被跳过跳过unpublishable项目。
But the project was skipped by "skipping unpublishable project".
予有解决方案的一个结构如下:
I have a following structure of the solution:
WashMyCarHomepage\WashMyCarHomepage.sln
WashMyCarHomepage\Repository\Repository.csproj
WashMyCarHomepage\WashMyCarHomepage\WashMyCarHomepage.csproj
我怎样才能解决这个问题呢?
How can I fix this problem?
推荐答案
一个长期的斗争这个问题我没有找到一个解决方案之后。我提供了整个CruiseControl.NET配置文件。
After a long struggle with this issue I did find a solution.I am providing the whole CruiseControl.NET configuration file.
<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>
请注意,部署,开发是在VisualStudio中设置的配置。
Please note that "Deploy-Dev" is a configuration that is set in a VisualStudio.
这篇关于使用CruiseControl.NET和的MSBuild发布网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!