I'm trying to use an XML entity in the App.config for a configuration value that appears in multiple appSettings.
I see the entity shows correctly in the VS 2008 xml editor, but when ConfigurationManager.AppSettings["SQLConnectionString"] returns, I see the literal text and not the resolved text "server=server\&SQLInstanceName;;database=Search;Integrated Security=SSPI;Max Pool Size=75; Min Pool Size=5".
Is this a bug in VS 2008 ConfigurationManager? Or is there a trick to make this work?
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE configuration
[
<!ENTITY SQLInstanceName "UnitTest">
]>
<configuration>
<appSettings>
<!-- Comment-->
<add key="SQLConnectionString" value="server=server\&SQLInstanceName;;database=Search;Integrated Security=SSPI;Max Pool Size=75; Min Pool Size=5"/>
</appSettings>
</configuration>