My.settings questions

B

Bob

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top