使用 CruiseControl.NET 指定目标平台

发布于 2024-09-07 05:26:09 字数 936 浏览 2 评论 0原文

我正在设置我的第一个自动构建服务器...到目前为止,一切都进展顺利,CruiseControl.NET 正确地从 VisualSVN 中检查了所有必需文件并构建了解决方案...但是,这就是我的地方遇到问题...

首先设置构建服务器的一个重要原因是我需要使用我的项目/设置文件来定位 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。我怎样才能做到这一点?

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

感谢您的帮助...

I am in a proccess of setting up my very first automated build server ... Everything has went quite smoothly so far, CruiseControl.NET correctly checks out all the nececery files from VisualSVN and builds the solution ... However, this is where I encounter a problem...

A big reason for setting up a build server in the first place is because I need to target both, x86 and x64 with my projects/setup files. I am unable to find the way to do this. This is my configuration file so far (the relevant bit):

    <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>

This works correctly, however I want CruiseControl.NET to build it two times, once for target platform x86 and once for x64. How can I do that?

I suspect I need to add an additional parameter in configuration block, however nothing seems to work and I was (oddly enough) unable to find an example with this feature...

Thanks for your help...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

反目相谮 2024-09-14 05:26:09

您可以尝试使用 msbuild 任务,它应该允许您做您想做的事情...只需向其传递适当的参数即可。首先,您必须在项目文件中设置配置,如此处。然后,您可以添加几个 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 执行类似的操作,但我不确定。

You could try using the msbuild task instead, which should allow you to do what you want to do... just pass in the appropriate parameters to it. First you will have to set up the configurations in you project file, as outlined here. Then you can add several msbuild targets (one for each configuration you want to build) , which will be similar to this one:

<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>

I suppose you might be able to do something similar using devenv, but I'm not sure.

不知在何时 2024-09-14 05:26:09

请在此处查看答案:如何指定devenv 中的平台构建 CruiseControl.net

<devenv>
    <configuration>Debug|x86</configuration>
</devenv>

See an answer here: How to specify the platform in devenv build CruiseControl.net

<devenv>
    <configuration>Debug|x86</configuration>
</devenv>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文