G
Guest
I have an application with custom configuration sections in it's app.config
file.
Here's a shortened excerpt:
<monitors>
<monitor
type="SystemMonitor.Monitors.NetworkAvailabilityMonitor,SystemMonitor">
<notifiers>
<notifier type="SystemMonitor.Notifiers.MessageBoxNotifier,SystemMonitor" />
<notifier type="SystemMonitor.Notifiers.EventLogNotifier,SystemMonitor">
</notifier>
</notifiers>
</monitor>
</monitors>
here's some code from the application. Note again shortened, this is only
the section defining a "monitor" section above:
mports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Configuration
Namespace Configuration
Class MonitorElement
Inherits ConfigurationElement
<ConfigurationProperty("type")> _
Public Property TypeName() As String
Get
Return CStr(MyBase.Item("type"))
End Get
Set(ByVal value As String)
MyBase.Item("type") = value
End Set
End Property
<ConfigurationProperty("settings", IsDefaultCollection:=False)> _
Public ReadOnly Property Settings() As SettingElementCollection
Get
Return CType(MyBase.Item("settings"),
SettingElementCollection)
End Get
End Property
<ConfigurationProperty("notifiers", IsDefaultCollection:=False)> _
Public ReadOnly Property Notifiers() As NotifierElementCollection
Get
Return CType(MyBase.Item("notifiers"),
NotifierElementCollection)
End Get
End Property
End Class
End Namespace
Under VS2005 Beta2, this worked just fine. However, now i have recompiled
using VS2005 RTM and am getting an error on the line that says:
<monitor type=.....
Specifically the error is that "type" is not defined.
So obviously something was changed but I am having trouble determing what
was changed so i can fix the code in question.
Thanks in advance,
Robert.
file.
Here's a shortened excerpt:
<monitors>
<monitor
type="SystemMonitor.Monitors.NetworkAvailabilityMonitor,SystemMonitor">
<notifiers>
<notifier type="SystemMonitor.Notifiers.MessageBoxNotifier,SystemMonitor" />
<notifier type="SystemMonitor.Notifiers.EventLogNotifier,SystemMonitor">
</notifier>
</notifiers>
</monitor>
</monitors>
here's some code from the application. Note again shortened, this is only
the section defining a "monitor" section above:
mports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Configuration
Namespace Configuration
Class MonitorElement
Inherits ConfigurationElement
<ConfigurationProperty("type")> _
Public Property TypeName() As String
Get
Return CStr(MyBase.Item("type"))
End Get
Set(ByVal value As String)
MyBase.Item("type") = value
End Set
End Property
<ConfigurationProperty("settings", IsDefaultCollection:=False)> _
Public ReadOnly Property Settings() As SettingElementCollection
Get
Return CType(MyBase.Item("settings"),
SettingElementCollection)
End Get
End Property
<ConfigurationProperty("notifiers", IsDefaultCollection:=False)> _
Public ReadOnly Property Notifiers() As NotifierElementCollection
Get
Return CType(MyBase.Item("notifiers"),
NotifierElementCollection)
End Get
End Property
End Class
End Namespace
Under VS2005 Beta2, this worked just fine. However, now i have recompiled
using VS2005 RTM and am getting an error on the line that says:
<monitor type=.....
Specifically the error is that "type" is not defined.
So obviously something was changed but I am having trouble determing what
was changed so i can fix the code in question.
Thanks in advance,
Robert.