|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
My.settings questionssettings.settings type string, scope user user. That created the follwing app.config file content. <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="WindowsTestSettings.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> </sectionGroup> </configSections> <system.diagnostics> <sources> <!-- This section defines the logging configuration for My.Application.Log --> <source name="DefaultSource" switchName="DefaultSwitch"> <listeners> <add name="FileLog"/> <!-- Uncomment the below section to write to the Application Event Log --> <!--<add name="EventLog"/>--> </listeners> </source> </sources> <switches> <add name="DefaultSwitch" value="Information" /> </switches> <sharedListeners> <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/> <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log --> <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> --> </sharedListeners> </system.diagnostics> <userSettings> <WindowsTestSettings.My.MySettings> <setting name="test" serializeAs="String"> <value>test value</value> </setting> </WindowsTestSettings.My.MySettings> </userSettings> </configuration> Looking at the file in the sectionname section on top of the file the requirePermission attribute is underlined in red and the tooltip says the requirePermission attribute is not declared. Also I get 1 wanrning and 6 messages. The messages all say Could not find schema information for elemnt 'userSettings' then its for WindowsTestSettings..My.Mysettings then for settings, then name, then serialize as and finally value. The warning is about requirePermission attribute is not declared. What do I need to do to make this app.config file not give me any warnings and make the messages go away? Thanks, Bob Hi there!
I had a similar problem with my App.Config files. Although it never affected my application, all those warnings can cause some annoyance. I found this article by Frederik Gheysel which should help you out. http://fgheysels.blogspot.com/2006/04/net-20-could-not-find-schema.html Regards, Michael Bosch Show quoteHide quote "Bob" <bduf***@sgiims.com> wrote in message news:%23xBgA9DdGHA.1792@TK2MSFTNGP03.phx.gbl... >I opened a new project in vb.net 2005. Just entered 1 setting test in the >settings.settings type string, scope user user. > That created the follwing app.config file content. > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > <configSections> > > <sectionGroup name="userSettings" > type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089" > > > <section name="WindowsTestSettings.My.MySettings" > type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089" > allowExeDefinition="MachineToLocalUser" requirePermission="false" /> > > </sectionGroup> > > </configSections> > > <system.diagnostics> > > <sources> > > <!-- This section defines the logging configuration for > My.Application.Log --> > > <source name="DefaultSource" switchName="DefaultSwitch"> > > <listeners> > > <add name="FileLog"/> > > <!-- Uncomment the below section to write to the Application Event Log --> > > <!--<add name="EventLog"/>--> > > </listeners> > > </source> > > </sources> > > <switches> > > <add name="DefaultSwitch" value="Information" /> > > </switches> > > <sharedListeners> > > <add name="FileLog" > > type="Microsoft.VisualBasic.Logging.FileLogTraceListener, > Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" > > initializeData="FileLogWriter"/> > > <!-- Uncomment the below section and replace APPLICATION_NAME with the > name of your application to write to the Application Event Log --> > > <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" > initializeData="APPLICATION_NAME"/> --> > > </sharedListeners> > > </system.diagnostics> > > <userSettings> > > <WindowsTestSettings.My.MySettings> > > <setting name="test" serializeAs="String"> > > <value>test value</value> > > </setting> > > </WindowsTestSettings.My.MySettings> > > </userSettings> > > </configuration> > > > > Looking at the file in the sectionname section on top of the file the > requirePermission attribute is underlined in red and the tooltip says the > requirePermission attribute is not declared. > > Also I get 1 wanrning and 6 messages. The messages all say > > Could not find schema information for elemnt 'userSettings' then its for > WindowsTestSettings..My.Mysettings then for settings, then name, then > serialize as and finally value. > > The warning is about requirePermission attribute is not declared. > > What do I need to do to make this app.config file not give me any warnings > and make the messages go away? > > > > Thanks, > > Bob > > > >
Rewrite ...
DataTable.Select() is bugged? Getting a file's ContentType OpenGL Control Flickering Problem RegEx for splitting comma delimited text, HOW Control for Sql Connection? running app on network drive Attaching a thread windows forms finder (help me) How to connect/disconnect to remote machine using VPN programmatic |
|||||||||||||||||||||||