H
Harold Howe
When .NET loads an app.config at runtime (myapp.exe.config), will it
honor an entity declaration? Based on what I am seeing, the answer is
no, but I think, or hope, that I am doing something wrong.
I tried this:
// myapp.exe.config
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE configuration [
<!ENTITY mydll SYSTEM "mydll.xml">
]>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
&mydll;
</assemblyBinding>
</runtime>
</configuration>
//mydll.xml
<dependentAssembly>
<assemblyIdentity name="mydll"
publicKeyToken="cbbe122047afc212"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-999.9999.9999.9999"
newVersion="1.0.4.0"/>
</dependentAssembly>
I verified that I have everything formatted correctly by loading the
config file into internet explorer (after changing the file extention to
..xml). IE processes the entity include just fine, but when I run my app,
fuslogvw reports that the XML config file is not formatted correctly.
LOG: This bind starts in default load context.
ERR: There was an error parsing XML (hr = 0xc00ce565).
WRN: Error parsing XML file N:\MyApp\bin\Debug\MyApp.exe.config. Ignoring.
I am trying to use an xml entity to include a separate config file with
a collection of binding redirects and codebase statements. Why am I
doing that? It is a long a sordid tale... But if there is another way to
import, merge, or share a config file, I would be open to it.
H^2
honor an entity declaration? Based on what I am seeing, the answer is
no, but I think, or hope, that I am doing something wrong.
I tried this:
// myapp.exe.config
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE configuration [
<!ENTITY mydll SYSTEM "mydll.xml">
]>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
&mydll;
</assemblyBinding>
</runtime>
</configuration>
//mydll.xml
<dependentAssembly>
<assemblyIdentity name="mydll"
publicKeyToken="cbbe122047afc212"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-999.9999.9999.9999"
newVersion="1.0.4.0"/>
</dependentAssembly>
I verified that I have everything formatted correctly by loading the
config file into internet explorer (after changing the file extention to
..xml). IE processes the entity include just fine, but when I run my app,
fuslogvw reports that the XML config file is not formatted correctly.
LOG: This bind starts in default load context.
ERR: There was an error parsing XML (hr = 0xc00ce565).
WRN: Error parsing XML file N:\MyApp\bin\Debug\MyApp.exe.config. Ignoring.
I am trying to use an xml entity to include a separate config file with
a collection of binding redirects and codebase statements. Why am I
doing that? It is a long a sordid tale... But if there is another way to
import, merge, or share a config file, I would be open to it.
H^2