发布发布活动 [英] Post Publish Events
问题描述
对于正常的(例如Windows Forms)C#应用程序,在成功构建之后执行命令,我将在项目属性中使用Build Events-> Post-build事件命令行。
我有一个网站项目,我在发布,使用解决方案资源管理器的上下文菜单中的发布...命令。
是否有在成功发布后运行命令的方法,如果是这样做? (例如,发布后事件命令行字段)
Visual Studio 2008,ASP .Net网站项目,C#。
更新:由于发布Web不适用于基于文件夹的网站项目,因此本答案假定您询问Web应用程序项目。 / p>
您不能从VS IDE内部执行此操作。但是,您可以在记事本或您最喜欢的XML编辑器中编辑项目文件,并在名为 AfterPublish
的文件末尾添加一个新目标。
您可能想要阅读更多关于 MSBuild 如果您不确定该目标可以做什么。
您可以在MSDN中找到有关在VS中扩展构建过程的更多详细信息 - HowTo:扩展Visual Studio构建过程。
For normal (say Windows Forms) C# applications, to execute commands after a successful build I would use the Build Events->Post-build event command line in Project Properties.
I have a Web Site project which I "Publish", using the "Publish..." command in the context menu in the solution explorer.
Is there a way to run commands after the successful publish and if so how is it done? (eg a Post-Publish event command line field)
Visual Studio 2008, ASP .Net Web site project, C#.
Update: Since Publish Web does not apply to folder-based web site projects, this answer assumes you are asking about a Web Application project.
You can't do this from inside the VS IDE. However, you can edit your project file in Notepad or your favorite XML editor and add a new target at the end of the file called AfterPublish
.
You might want to read a bit more on MSBuild if you are not sure what you can do in this target.
You can find more details on extending the build process in VS at MSDN - HowTo: Extend the Visual Studio Build Process.
这篇关于发布发布活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!