更新时间:2022-01-12 07:36:57
如果XML文件签入到TFS那么当TFS获取文件到构建服务器上的工作区,将有只读属性与该文件相关联。现在,当编译生成新的XML文件,它不会是能够覆盖旧的XML文件,因为它具有只读属性。
If the XML file is checked-in to TFS then when TFS gets the files to the workspace on the build server, it will have "Read-Only attribute" associated with the file. Now when the build generates the new XML file, it wont be able to overwrite the old XML file since it has the read-only attribute.
解决方法是:
A)使用你的构建脚本修改文件属性,使其读写
b)将签入到TFS使XML文件,构建就能方便地生成XML。
Solution is to: a) use your build scripts to modify the file attribute and make it read-write b) remove the xml file checked-in to TFS so that, build will be able to generate the XML easily.
更新:如果你正在使用的解决方案B,如果该文件是你的一部分项目文件,确保您从文件的csproj删除文件以及
Update: if you are using solution b, if the file is part of you project file make sure that you remove the file from the csproj file as well.