[Mono-dev] Exception with Mono reading application setting, not with .NET

Lionel Cuir lionel_email at aulofee.com
Fri Jan 20 08:55:34 UTC 2012


Hi all,

Trying a new application which has a setting file and which was running fine
on .NET, I got the following exception when running it in Mono:

System.Configuration.ConfigurationErrorsException: Unrecognized attribute
'xsi'. (/root/gwtest/PrivateLife.exe.config line 1)
  at System.Configuration.ConfigurationElement.DeserializeElement
(System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in
<filename unknown>:0
  at System.Configuration.ConfigurationSection.DoDeserializeSection
(System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationSection.DeserializeSection
(System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.GetSectionInstance
(System.Configuration.SectionInfo config, Boolean createDefaultInstance)
[0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationSectionCollection.get_Item
(System.String name) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.GetSection (System.String path)
[0x00000] in <filename unknown>:0
  at Yoono.Config.FileDataProvider.Initialize () [0x00000] in <filename
unknown>:0

Here is my .config file:

<?xml	version="1.0"?>
<configuration>
	<configSections>
		<section name="ServerConfiguration"
type="YooNo.Config.ServerConfigurationSection, YooNo"/>
	</configSections>
	<ServerConfiguration xmlns="http://tempuri.org/YooNo.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="YooNo.xsd">
		<Website>
			...

Actually, I've added to the .config file some attributes to specify a XSD
for that .config (with intellisense, that really helps when manually
modifying the .config). .NET accepts it without yelling, but it seems Mono
doesn't.

Any advice on how to do? Can I simply rewrite these two xmlns attributes
differently? Should I remove them? ... or should I open a ticket in Mono
bugtracker?

Thanks in advance for your tips!

Lionel



More information about the Mono-devel-list mailing list