Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
726 views
in Technique[技术] by (71.8m points)

asp.net - VS 2010 configuration transformation produces unwanted white space during deployment

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>

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.

Any idea?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

Update

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...