TFS生成工作流更改文件夹/文件属性从只读读/写? [英] TFS Build Workflow Change Folder/File Attributes From Read-Only to Read/Write?
问题描述
在我们的web应用程序之一,它是必需的,一些HTML页可编辑在我们为用户创建GUI界面。不幸的是,该接口直接读/写从页面的服务器上(也在wwwroot)中。服务器上的另一个页面读取它,只是显示出来。
In one of our web applications, it is required that some HTML pages be editable in a GUI interface we created for the user. Unfortunately, the interface directly reads/writes from a page on the server (also in the wwwroot). Another page on the server reads from it and just displays it.
现在我已经做了什么改变了我们的整个构建过程,这样,没有什么是手动的了,我现在用的构建工作流TFS / VS 2010,这是很好。
What I have now done is changed our entire build process so that nothing is manual anymore and I am now using the build workflow with TFS/VS 2010 which is nice.
但TFS自动把一切都在只读模式时,它部署code。
But TFS automatically puts everything in read-only mode when it deploys the code.
有没有一种方法以编程方式(在该过程中的任何步骤),从只读到读写更改文件夹/文件的属性,使Web界面仍然可以正常工作?
Is there a way to programatically (at any step in the process), change the attributes of a folder/file from read-only to read-write so that the web interface still works correctly?
推荐答案
如何将运行一个自定义code活性后部署更新的属性文件不FileAttributes.Normal的?在构建结束时,控制器上这项活动可能应该运行。
How about adding a custom code activity that runs post-deploy to update the attributes of the files to not FileAttributes.Normal? This activity should probably run on the controller at the end of the build.
您可能想看看埃瓦尔德·霍夫曼的<一个href="http://www.ewaldhofman.nl/post/2010/04/29/Customize-Team-Build-2010-e28093-Part-4-Create-your-own-activity.aspx"相对=nofollow>构建定制的系列。构建服务帐户将可能有正确的权限来更新部署的文件属性。
You might want to check out Ewald Hofman's series of build customization. Your build service account will likely have the correct permissions to update the deployed file attributes.
希望这有助于。
这篇关于TFS生成工作流更改文件夹/文件属性从只读读/写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!