gpt4 book ai didi

build-automation - 使用 CruiseControl.NET 指定目标平台

转载 作者:行者123 更新时间:2023-12-04 07:22:47 24 4
gpt4 key购买 nike

我正在设置我的第一个自动构建服务器......到目前为止一切都进行得很顺利,CruiseControl.NET 正确地从 VisualSVN 中 check out 所有 nececery 文件并构建解决方案......但是,这是我的地方遇到问题...

首先设置构建服务器的一个重要原因是我需要使用我的项目/设置文件同时针对 x86 和 x64。我无法找到方法来做到这一点。到目前为止,这是我的配置文件(相关位):

    <tasks>
<devenv>
<solutionfile>ProjectName.sln</solutionfile>
<configuration>Release</configuration>
<buildtype>Rebuild</buildtype>
<project>ProjectName</project>
<executable>C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com</executable>
<buildTimeoutSeconds>600</buildTimeoutSeconds>
<version>VS2010</version>
</devenv>
</tasks>

这工作正常,但是我希望 CruiseControl.NET 构建它两次,一次用于目标平台 x86,一次用于 x64。我怎样才能做到这一点?

我怀疑我需要在配置块中添加一个额外的参数,但是似乎没有任何效果,而且我(奇怪的是)无法找到具有此功能的示例...

谢谢你的帮助...

最佳答案

你可以尝试使用 msbuild 任务,它应该允许你做你想做的事情......只需将适当的参数传递给它。首先,您必须在项目文件中设置配置,如 here 所述。 .然后你可以添加几个 msbuild 目标(你要构建的每个配置一个),这将类似于这个:

<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\svn\TRUNK\Project</workingDirectory>
<projectFile>Solution.sln</projectFile>
<buildArgs>/noconsolelogger /t:Rebuild /p:Configuration=Release</buildArgs>
<timeout>900</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>

我想您可以使用 devenv 做类似的事情,但我不确定。

关于build-automation - 使用 CruiseControl.NET 指定目标平台,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3147086/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com