WCF自动化部署
我正在设置一些 IIS 托管的 WCF 项目以进行持续集成,并且一直在努力寻找实现部署自动化的最佳和最简单的方法。
现在,我已经使用 CC.NET、MSBUILD 和批处理文件进行构建和部署,该批处理文件将必要的文件复制到部署文件夹,但我认为必须有更好的方法。
理想情况下,我想要类似 Web 部署项目的东西,但是针对 WCF。
我会选择一个不错的 Power Shell 脚本来复制所有必要的文件并排除所有多余的内容。
I am in the process of setting up some IIS hosted WCF projects for continuous integration and am stuck trying to find the best and simplest way to get deployment automated.
Right now, I have the build and deploy working with CC.NET, MSBUILD and a batch file that copies the necessary files to the deployment folder, but I think there must be a better way.
Ideally, I'd like something like web deployment projects, but for WCF.
I would settle for a nice Power Shell script to copy all the necessary files and exclude all the fluff.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,没有什么可以阻止您使用 Web 部署项目来托管 WCF 类库。 SVC 文件将由 IIS 选取并进行适当的路由。 我们使用标准部署项目和自定义操作来创建 IIS vroot,以便我们可以更好地控制设置,但标准 Web 部署项目也可以完成这项工作。
除非您在 IIS7 下运行,否则就 IIS 而言,它只是具有自己的处理程序的标准内容。 当您进入 Windows 2008 / Windows 7 Beta 时,情况可能会发生一些变化,因为这些版本具有非常不同的处理程序模型。
我发现这篇文章非常有帮助: http://msdn.microsoft .com/en-us/library/bb332338.aspx
Well, there isn't anything stopping you from using a web deployment project for hosting your WCF class library. The SVC file will be picked up by IIS and routed appropriately. We use a standard deployment project and a custom action to create the IIS vroot so that we have a finer control over the settings but a standard web deployment project will do the job as well.
Unless you are running under IIS7 then as far as IIS is concerned it's just standard content that has it's own handler. When you get to Windows 2008 / Windows 7 Beta then things can change a bit as those versions have a very different handler model.
I've found this post to be really helpful: http://msdn.microsoft.com/en-us/library/bb332338.aspx
这在很大程度上取决于您所使用的技术。 在之前的项目中,我们使用了 TFS 和 Team Build。 结果是 WCF 项目被构建到与其部署结构相匹配的文件夹结构中。 MSBUILD 脚本中的其他任务触发了部署脚本(我认为是用 PERL 编写的)。 这处理了所有部署任务,从删除旧文件夹、创建新文件夹、创建数据库并填充参考数据,然后部署服务和网站,最后运行安装验证脚本并将结果发布到网站。
另一方面,如果你只有一把锤子,那就用锤子敲吧。
This depends very much on the technologies you are using. On a previous project, we used TFS, with Team Build. The result was that the WCF projects were built into a folder structure that matched their deployment structure. Additional tasks in the MSBUILD script triggered a deployment script (written in PERL, I think). This took care of all deployment tasks, from deleting old folders, creating the new, creating databases and populating with reference data, then deploying the service and web sites, and finally running Installation Verification scripts and publishing the results to a web site.
On the other hand, if all you've got is a hammer, then hammer away.