简体   繁体   English

Visual Studio中的msdeploy发布配置文件

[英]msdeploy inside visual studio publish profile

How do i use my custom msdeploy and msbuild community task script from VS 2010 web deployment project inside a visual studio 2012 publish profile? 如何在Visual Studio 2012发布配置文件中使用来自VS 2010 Web部署项目的自定义msdeploy和msbuild社区任务脚本?

My script in VS2010 builds to a local directory and then makes a few modifications to the generated files and sends it up. 我在VS2010中的脚本会构建到本地目录,然后对生成的文件进行一些修改并将其发送出去。 This is all tied to the specific configuration that is selected for example: Test, stage, production configurations. 所有这些都与选择的特定配置相关,例如:测试,阶段,生产配置。

For some reason i cannot see how this plays out using the publish feature in VS 2012 由于某些原因,我看不到如何使用VS 2012中的发布功能播放

In VS 2012 you can have a core web.config and then multiple web.configs for each configuration that you build such as web.debug.config etc. 在VS 2012中,您可以拥有一个核心的web.config,然后为您构建的每个配置都拥有多个web.config,例如web.debug.config等。

When you build and publish, based on the configuration you choose a web.config is generated on the fly which combines the parent web.config and the configuration specific web.config (based on what you specify, replace, add etc). 在构建和发布时,基于配置,您会选择一个web.config,它会动态生成,它结合了父web.config和特定于配置的web.config(基于您指定,替换,添加等)。

Then msdeploy is invoked to generate a web deploy package of this which is of type iisApp by default unless you specify include IIS settings. 然后,除非您指定包括IIS设置,否则将调用msdeploy生成此Web部署程序包,默认情况下,该程序包的类型为iisApp。

This package is deployed to the server you specify. 该软件包已部署到您指定的服务器。 If you have database connection strings etc, they will be replaced during publish to the server side values if you have specified them using web deploy parameterization. 如果您具有数据库连接字符串等,则在使用Web部署参数化指定它们的过程中,将在发布到服务器端值时替换它们。

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

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