CruiseControl.NET 与 Web 部署项目

发布于 2024-09-26 10:15:22 字数 348 浏览 0 评论 0原文

我们目前正在使用 Web 部署项目来编译解决方案中的项目并部署我们的网站。我们希望转而使用 CruiseControl .NET,使我们能够自动化构建、添加测试以及从网站界面启动/审查它们。目前,Web 部署项目具有对所有项目(70 多个)的项目引用,并且具有远程 DeployPath。这最终会运行 aspnet_compile 和 aspnet_merge 并将文件(程序集 + 标记)放到我们的远程服务器上。

我想用 CC 模拟这种行为,但我不知道该怎么做。我尝试过使用 wdproj 作为 msbuild 的目标(希望它能够构建并工作),但这似乎失败了。我有预感我需要 NAnt 任务或类似的任务来执行编译/合并步骤。

有人能指出我正确的方向吗?

We are currently using a web deployment project to compile the projects in our solution and deploy our website. We'd like to move to using CruiseControl .NET to give us the abilities to automate the builds, add testing, and initiate/review them from a website interface. Currently the web deployment project has project references to all of the projects (70+) and then has a remote DeployPath. This ends up running aspnet_compile and aspnet_merge and dropping the files (assemblies + markup) on our remote server.

I'd like to simulate this behavior with CC but I can't figure out how to do it. I've tried using the wdproj as a target of msbuild (in hopes that it would just build and work) but that seems to fail. I have a hunch I'm going to need a NAnt task or something of the sort to perform the compile/merge steps.

Could someone point me in the right direction?

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

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

发布评论

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

评论(2

奢望 2024-10-03 10:15:22

据我所知,不可能使用 msbuild 构建标准的 wdproj 部署项目。对于标准部署项目,我认为您需要安装 Visual Studio。

所以我看到这些选项:

1) 构建服务器上的 Visual Studio:在构建服务器上安装 Visual Studio,然后使用 Visual Studio (devenv.exe) 执行构建。

2) WIX:如果您需要 Web 部署项目,并且不会在构建服务器上安装 Visual Studio,请尝试使用 Windows Installer XML 制作部署项目:http://wix.sourceforge.net

3) 使用 msbuild 复制网站:跳过 Web 部署项目,并使用 msbuild 将网站内容直接输出到测试服务器上,或者放入临时文件夹中,然后将其打包使用 NAnt zip 任务:

<exec program="msbuild" commandline="MySolution.sln" />
<exec program="msbuild"
  commandline="MyWebsite\MyWebsite.csproj /t:ResolveReferences;_CopyWebApplication /p:WebProjectOutputDir=\\MyServer\MyWebsite;OutDir=\\MyServer\MyWebsite\" />

该示例假设您在 Visual Studio 中有一个 Web 应用程序项目。如果您在 Visual Studio 中有一个网站项目,则确切的步骤会有所不同,但仍然可以遵循相同的思路。

As far as I know it is not possible to build the standard wdproj deployment projects with msbuild. For a standard deployment project I think you'll need Visual Studio installed.

So I see these options:

1) Visual Studio on build server: Install Visual Studio on the build server, and then execute the build with Visual Studio (devenv.exe).

2) WIX: If you need a web deployment project, and you will not install Visual Studio on the build server, try making a deployment project with Windows Installer XML instead: http://wix.sourceforge.net.

3) Copy website with msbuild: Skip the web deployment project, and use msbuild to either output the website stuff directly on the test server, or to put in a temporary folder which you can then make into a package with the NAnt zip task:

<exec program="msbuild" commandline="MySolution.sln" />
<exec program="msbuild"
  commandline="MyWebsite\MyWebsite.csproj /t:ResolveReferences;_CopyWebApplication /p:WebProjectOutputDir=\\MyServer\MyWebsite;OutDir=\\MyServer\MyWebsite\" />

The example assumes that you have a web application project in Visual Studio. If you instead have a website project in Visual Studio, the exact steps will be different, but still possible along the same lines.

情绪 2024-10-03 10:15:22

我最终使用 msbuild 来运行 AspNetCompile 和 AspNetMerge。只需指向正确的 Web 文件夹,它就能找到适当的依赖项。感谢各位的帮助!

I ended up using msbuild to run AspNetCompile and AspNetMerge. By just pointing to the correct web folder it found the appropriate dependencies. Thanks for the help guys!

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