VS 2010 配置转换在部署期间产生不需要的空白 [英] VS 2010 configuration transformation produces unwanted white space during deployment

查看:19
本文介绍了VS 2010 配置转换在部署期间产生不需要的空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用新的 VS 2010 配置转换来部署网站.要替换我的 ApplicationSettings 的单个设置,我使用以下配置转换:

I use the new VS 2010 configuration transformations to deploy websites. To replace a single setting of my ApplicationSettings I use the following configuration transformation:

<setting name="TempPath" serializeAs="String" xdt:Transform="Replace" xdt:Locator="Match(name)">
    <value>C:TEMP</value>
</setting>

备注: C:TEMP 和结束标记之间没有空格

Remark: There is no white space between C:TEMP and the end tag

这种转换会导致设置带有不需要的空白,如下所示:

This transformation results in a setting with unwanted white space like this:

<setting name="TempPath" serializeAs="String">
    <value>C:TEMP
    </value>
</setting>

如果我在不修整的情况下使用此设置,则会出现错误行为.

If I use this setting without trimming it, I get faulty behaviour.

有什么想法吗?

推荐答案

这是一个 已知问题 VS 2010.据微软称,它将为服务包修复和下一个版本.

This is a known problem of VS 2010. According to Microsoft it will be fixed for the service pack and next release.

更新

SP1 的最终版本解决了这个问题.不再需要移除不需要的换行符的解决方法.

The final release of the SP1 solves this problem. Workarounds to remove unwanted line feeds are no longer necessary.

这篇关于VS 2010 配置转换在部署期间产生不需要的空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆