I am not sure how this happend, but when I try to debug the cliënt I get the following Configuration system failed to initialize error.
in ClientSettings.Designer.cs
[global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("600000")] public uint Network_SyncGameTimeFrequency { get { return ((uint)(this["Network_SyncGameTimeFrequency"])); } }
The error shows this line as being were the error is: return ((uint)(this["Network_SyncGameTimeFrequency"]));
I have no idea why this is happening ( also not clear as what the error actually means) When I rebuild the solution and start the client.exe there seem to be no problem and everything works at is shuould be.
I hope someone can help me
Uhmz asfar as I understand things. It only says:
ConfigurationErrorsException was unhandled and then Configuration system failed to initialize.
Not sure how to give you more info then that. Still learning my way in C#
maybe this will offer some more help:
System.Configuration.ConfigurationErrorsException was unhandled
Message=Configuration system failed to initialize
Source=System.Configuration
BareMessage=Configuration system failed to initialize
Line=0
StackTrace:
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
at System.Configuration.SettingsBase.get_Item(String propertyName)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at DemoGame.Client.Properties.ClientSettings.get_Network_SyncGameTimeFrequency() in C:\Documents and Settings\Linda\Bureaublad\netgore 0.3.5\NetGore\DemoGame.Client\Properties\ClientSettings.Designer.cs:line 40
at DemoGame.Client.GameplayScreen..ctor(IScreenManager screenManager) in C:\Documents and Settings\Linda\Bureaublad\netgore 0.3.5\NetGore\DemoGame.Client\Screens\GameplayScreen.cs:line 58
at DemoGame.Client.DemoGame..ctor() in C:\Documents and Settings\Linda\Bureaublad\netgore 0.3.5\NetGore\DemoGame.Client\DemoGame.cs:line 65
at DemoGame.Client.Program.Main() in C:\Documents and Settings\Linda\Bureaublad\netgore 0.3.5\NetGore\DemoGame.Client\Program.cs:line 49
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Configuration.ConfigurationErrorsException
Message=Root element is missing. (C:\Documents and Settings\Linda\Local Settings\Application Data\DemoGame\DemoGame.Client.vshost.ex_StrongName_qi4krso0cpleboatzie550nbwph3ut5l\0.0.0.0\user.config)
Source=System.Configuration
BareMessage=Root element is missing.
Filename=C:\Documents and Settings\Linda\Local Settings\Application Data\DemoGame\DemoGame.Client.vshost.ex_StrongName_qi4krso0cpleboatzie550nbwph3ut5l\0.0.0.0\user.config
Line=0
StackTrace:
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
InnerException: System.Xml.XmlException
Message=Root element is missing.
Source=System.Xml
LineNumber=0
LinePosition=0
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Configuration.XmlUtil..ctor(Stream stream, String name, Boolean readToFirstElement, ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
InnerException:
Hi Spodi, sorry to bother you again.
I downloaded the latest version of netgore again, but even with this fresh unmodified version i get the same error. I guess it is not something in the code then. May I ask what the Network_SyncGameTimeFrequency property exactly does? Maybe I did something with the computer in general that causes this error.
Thanks in advance
Its just a value used to determine how frequently to update the GameTime. Nothing too important.
The error probably persisted since you likely didn't delete the configuration file. Its stored in: %AppData%\..\Local\DemoGame\
If you post the contents of the file (if there are multiple, post the one with the most recent modified date), I'll look into it.
Hi Spodi, This is the contents of the file with the most recent modified date
I guess this file is missing some code becuase I can't find a reference to the Network_SyncGameTimeFrequency property so maybe that is the problem.
<?xml version="1.0" encoding="utf-8"?> <configuration> <userSettings> <DemoGame.Client.Properties.ClientSettings> <setting name="UI_EnteredUserName" serializeAs="String"> <value>Spodi</value> </setting> <setting name="UI_EnteredPassword" serializeAs="String"> <value>P8CnrPCH9UmYrTCt2cCfOIM=</value> </setting> <setting name="Keys_MoveLeft" serializeAs="String"> <value>Left</value> </setting> <setting name="Keys_MoveRight" serializeAs="String"> <value>Right</value> </setting> <setting name="Keys_MoveUp" serializeAs="String"> <value>Up</value> </setting> <setting name="Keys_MoveDown" serializeAs="String"> <value>Down</value> </setting> <setting name="Keys_Attack" serializeAs="String"> <value>LControl</value> </setting> <setting name="Keys_UseWorld" serializeAs="String"> <value>LAlt</value> </setting> <setting name="Keys_UseShop" serializeAs="String"> <value>LAlt</value> </setting> <setting name="Keys_TalkToNPC" serializeAs="String"> <value>LAlt</value> </setting> <setting name="Keys_PickUp" serializeAs="String"> <value>Space</value> </setting> <setting name="Keys_EmoteEllipsis" serializeAs="String"> <value>Num1</value> </setting> <setting name="Keys_EmoteExclamation" serializeAs="String"> <value>Num2</value> </setting> <setting name="Keys_EmoteHeartbroken" serializeAs="String"> <value>Num3</value> </setting> <setting name="Keys_EmoteHearts" serializeAs="String"> <value>Num4</value> </setting> <setting name="Keys_EmoteMeat" serializeAs="String"> <value>Num5</value> </setting> <setting name="Keys_EmoteQuestion" serializeAs="String"> <value>Num6</value> </setting> <setting name="Keys_EmoteSweat" serializeAs="String"> <value>Num7</value> </setting> <setting name="Keys_QuickBarItem0" serializeAs="String"> <value>F1</value> </setting> <setting name="Keys_QuickBarItem1" serializeAs="String"> <value>F2</value> </setting> <setting name="Keys_QuickBarItem2" serializeAs="String"> <value>F3</value> </setting> <setting name="Keys_QuickBarItem3" serializeAs="String"> <value>F4</value> </setting> <setting name="Keys_QuickBarItem4" serializeAs="String"> <value>F5</value> </setting> <setting name="Keys_QuickBarItem5" serializeAs="String"> <value>F6</value> </setting> <setting name="Keys_QuickBarItem6" serializeAs="String"> <value>F7</value> </setting> <setting name="Keys_QuickBarItem7" serializeAs="String"> <value>F8</value> </setting> <setting name="Keys_QuickBarItem8" serializeAs="String"> <value>F9</value> </setting> <setting name="Keys_QuickBarItem9" serializeAs="String"> <value>F10</value> </setting> <setting name="Graphics_Fullscreen" serializeAs="String"> <value>True</value> </setting> </DemoGame.Client.Properties.ClientSettings> </userSettings> </configuration>
I hope this is info you asked for. Thanks in advance
Ah yeah, guess it is. That is unfortunate - would have expected missing values would just be set to the default value.
In any case, deleting that file should fix the problem.
thanks that did the trick
Can you post the actual error message?
My guess is you entered an invalid value for the Network_SyncGameTimeFrequency property. It has to contain numbers only.