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

查看:111
本文介绍了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.

任何想法?

推荐答案

这是已知问题。

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天全站免登陆