CruiseControl.NET 与 Web 部署项目
我们目前正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,不可能使用 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 任务:
该示例假设您在 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:
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.
我最终使用 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!