简体   繁体   English

配置Visual Studio以在构建时发布WCF服务应用程序

[英]Configure Visual Studio to publish the WCF service app on build

I have created a WCF application (the one with .svc file). 我创建了一个WCF应用程序(带有.svc文件的应用程序)。 When I build this project, only bunch of DLLs are created but to be able to host it in IIS, I have to use publish option (right click the project and publish). 当我构建该项目时,仅创建了一堆DLL,但是要能够将其托管在IIS中,我必须使用publish选项(右键单击该项目并进行发布)。 This generates DLLs, copies app.config and .svc file. 这将生成DLL,复制app.config和.svc文件。 This bunch now can be hosted in IIS. 现在可以在IIS中托管这一堆。

I want Visual studio to publish whenever i build the project. 每当我构建项目时,我都希望Visual Studio发布。 How can I do it? 我该怎么做?

您还可以查看添加一个Web应用程序项目并将其与Web部署项目耦合,然后在构建解决方案时,Web部署项目的输出应与发布操作相同-这种方法在连续运行中也更容易使用集成环境,如cruise control.net

怎么样:运行msbuild / target:Publish的构建后事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM