C# 如何在 vs2012 中将发布配置文件添加到新的 sln?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13441692/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 08:34:03  来源:igfitidea点击:

how to add publishing profile to a new sln in vs2012?

c#asp.netasp.net-mvcvisual-studio-2012web-deployment

提问by Elad Benda

I have read the publishing profiles have replaced WDP

我已阅读发布配置文件已取代 WDP

but I cannot find decent tutorial

但我找不到像样的教程

how to add and modify pubxmlfile to my project

如何pubxml在我的项目中添加和修改文件

any help will be appreciated

任何帮助将不胜感激

采纳答案by tdykstra

When you right-click a project and select Publish, you get the Publish Webwizard. Using this to create a profile (you don't have to actually publish in order to create a profile) creates the .pubxml, and on the first step of the wizard you can use the Manage Profilesbutton to rename or delete profiles. Profiles are created in a PublishProfiles folder under Properties. See

当您右键单击一个项目并选择Publish 时,您将获得发布 Web向导。使用它来创建配置文件(您不必为了创建配置文件而实际发布)创建 .pubxml,并且在向导的第一步中,您可以使用管理配置文件按钮来重命名或删除配置文件。配置文件是在属性下的 PublishProfiles 文件夹中创建的。看

http://msdn.microsoft.com/en-us/library/ff398069.aspx

http://msdn.microsoft.com/en-us/library/ff398069.aspx

回答by StockBreak

In order to create a new profileonce you have already defined one, you have to open the "Publish" window (righ click on the project), click on the "Profile" tab and select the <New...>option from the drop-down list; this will create a new pubxmlfile (see screenshot).
It's a bit tricky to find and I wonder why they didn't put a "New" button on the "Manage profiles" window.

为了在您定义一个新的配置文件后创建一个新的配置文件,您必须打开“发布”窗口(右键单击项目),单击“配置文件”选项卡并<New...>从下拉列表中选择选项;这将创建一个新pubxml文件(见截图)。
找到它有点棘手,我想知道为什么他们没有在“管理配置文件”窗口上放置一个“新建”按钮。

enter image description here

在此处输入图片说明