expand app.Config ... get Error

Ask general questions here.
karlsruher
Posts: 4
Joined: Thu Mar 06, 2014 10:23 am

expand app.Config ... get Error

Post by karlsruher » Thu Mar 06, 2014 10:58 am

Hi,

if i expand the app.Config i got a error if i start my test-solution. The Error told me there is Trouble with Ranorex.Keyboard and Sections are more of one (but i Count the sections and my result is one)

So i take the app.config, transfer it to a real vs 2010 and try it out - it works - did i make a mistake ??
Error and appConfig following ...

Code: Select all

System.TypeInitializationException: Der Typeninitialisierer für "Ranorex.Keyboard" hat eine Ausnahme verursacht. ---> System.Configuration.ConfigurationErrorsException: Das Konfigurationssystem konnte nicht initialisiert werden. ---> System.Configuration.ConfigurationErrorsException: Unbekanntes Element.
   at Ranorex.Keyboard.set_AbortKey
   at dmsTest.Program.Main
My app Config:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<configSections>
        <sectionGroup name="ParameterSettings">
			<section name="AppGlobalSettings" type="System.Configuration.NameValueSectionHandler,System" />
		</sectionGroup> />
    </configSections>
	<ParameterSetting>
		<AppGlobalSettings>
			<add key="AppStartPathFile" value="C:\Program Files (x86)\xxx.exe"/>
			<add key="FaktorWait" value="1,0"/>
			<add key="LogFile" value="C:\RanoRexTest\Log\rrLog.rxlog"/>
			<add key="LogFileMaxDays" value="3"/>
			<add key="DefUserName" value="xxxAdmin"/>
			<add key="DefUserPass" value="xxx"/>
		</AppGlobalSettings>
	</ParameterSetting>
  	<startup useLegacyV2RuntimeActivationPolicy="true">
    	<supportedRuntime version="v4.0"/>
    	<supportedRuntime version="v2.0.50727"/>
  	</startup>
  	<runtime>
    	<enforceFIPSPolicy enabled="false"/>
  	</runtime>
</configuration>
thx

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: expand app.Config ... get Error

Post by Support Team » Mon Mar 10, 2014 5:23 pm

Hi,

It seems you have a typo in your config file. The following worked for me:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<configSections>
		<sectionGroup name="ParameterSettings">
				<section name="AppGlobalSettings" type="System.Configuration.NameValueSectionHandler,System" />
		</sectionGroup>
	</configSections>
	<startup useLegacyV2RuntimeActivationPolicy="true">
		<supportedRuntime version="v4.0"/>
		<supportedRuntime version="v2.0.50727"/>
	</startup>
	<runtime>
		<enforceFIPSPolicy enabled="false"/>
	</runtime>
		<ParameterSettings>
		<AppGlobalSettings>
			<add key="AppStartPathFile" value="C:\Program Files (x86)\xxx.exe"/>
			<add key="FaktorWait" value="1,0"/>
			<add key="LogFile" value="C:\RanoRexTest\Log\rrLog.rxlog"/>
			<add key="LogFileMaxDays" value="3"/>
			<add key="DefUserName" value="xxxAdmin"/>
			<add key="DefUserPass" value="xxx"/>
		</AppGlobalSettings>
	</ParameterSettings>
</configuration>
Regards,
Markus