使用Visual Studio 2010的Web配置转型删除XML注释 [英] Remove XML comments using Visual Studio 2010 Web Config Transformation
问题描述
我们使用的是团队建设来处理我们的部署,我们的开发服务器,我们有必要从我们的web配置中删除评论时,它的转化。有谁知道如何删除< - ! - >
从Web配置文件使用转换注释行
We are using Team Build to handle our deployments to our development server, and we have a need to remove comments from our web config when it's transformed. Does anyone know how to remove the <!-- -->
comment lines from the web config file using a transformation?
推荐答案
我已经找到了答案。看来这是在Visual Studio /团队建设的XDT转换引擎一个已知的bug。此bug已被报道在三月份,所以不知道什么时候,这将是固定的。
I've found an answer. It seems this is a known bug in the XDT transformation engine in Visual Studio/Team Build. This bug was reported in March, so no idea when this will be fixed.
<一个href="https://connect.microsoft.com/VisualStudio/feedback/details/544183/web-config-transform-writes-extra-line-break-spaces-to-values-elements-under-applicationsettings-section?wa=wsignin1.0"相对=nofollow>这里的链接
编辑:此链接实际上是不相关的原题。我们终于想通这是不可能的,内置的web配置变换。所以我们最后写一个控制台应用程序脱光意见,并正确格式化转换的文件。
This link actually isn't related to the original question. We eventually figured it wasn't possible with the built-in web config transformations. So we ended up writing a console application to strip comments, and properly format the transformed file.
这篇关于使用Visual Studio 2010的Web配置转型删除XML注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!