MissingMethodException and ConfigurationSettings with OpenNETCF

  • Thread starter Thomas Schumacher
  • Start date
T

Thomas Schumacher

Hello Newsgroup,

i try to use the ConfigurationSettings Method from the OpenNETCF Assembly. I
get a MissingMethodException but i don't no why.

Here my app.config and the code.

<?xml version="1.0" encoding="iso-8859-2"?>
<configuration>
<appSettings>
<add key="DataSource" value="\Application\database.sdf" />
</appSettings>
</configuration>

public Sub Test()
try
msgbox(OpenNETCF.Configuration.ConfigurationSettings.AppSettings.Item("DataSource")
ex as exception
msgbox ex.ToString
end try
End Sub

My Hardware is a Symbol PPT8800

Any ideas

Best Regards Thomas
 
S

Sampathd

Hi,

Your config file has to be named: appname.exe.config, where appname is the
name of your application (project). Then you can read the setting with this
code:

ConfigurationSettings.AppSettings("DataSource")


Cheers,
Sampath.
 
T

Thomas Schumacher

Hi,

thanks for your answer, but i know that. App.config is the name in my VS
Project ;-)
my exename is test.exe and the config file is named test.exe.config
But this is not working :-(
ConfigurationSettings.AppSettings("DataSource") fire the
MissingMethodException

Regards Thomas
 
T

Thomas Schumacher

Hi,

no i don't found a machine.config file also i don't found a folder named
config in the windows folder.
is this essential? can you post a sample of a machine.config file?

thanks Thomas
 

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