运行程序解析setting的字段出现问题,报CS1056 \CS1040\CS0116
自编软件启动时报错:
The property 'CultureConfig' could not be created from it's default value. Error message: Unable to generate a temporary class (result=1).\r\nerror CS1056: Unexpected character ''\r\nerror CS1040: Preprocessor directives must appear as the first non-whitespace character on a line\r\nerror CS0116: A namespace cannot directly contain members such as fields or methods\r\n\r\n at System.Configuration.SettingsPropertyValue.Deserialize()\r\n at System.Configuration.SettingsPropertyValue.get_PropertyValue()\r\n at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)\r\n at System.Configuration.SettingsBase.get_Item(String propertyName)\r\n at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)\r\n at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)\r\n at NcStudio.Properties.Settings.get_CultureConfig()\r\n at NcStudio.Program.Main(String[] args)
592 Error 10/11/2018 9:42:43 PM Event o.main.error The property 'CultureConfig' could not be created from it's default value. Error message: Unable to generate a temporary class (result=1).\r\nerror CS1056: Unexpected character ''\r\nerror CS1040: Preprocessor directives must appear as the first non-whitespace character on a line\r\nerror CS0116: A namespace cannot directly contain members such as fields or methods\r\n\r\n at System.Configuration.SettingsPropertyValue.Deserialize()\r\n at System.Configuration.SettingsPropertyValue.get_PropertyValue()\r\n at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)\r\n at System.Configuration.SettingsBase.get_Item(String propertyName)\r\n at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)\r\n at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)\r\n at NcStudio.Properties.Settings.get_CultureConfig()\r\n at NcStudio.Program.Main(String[] args)
593 Error 10/11/2018 9:42:43 PM Event p.start.error The property 'CultureConfig' could not be created from it's default value. Error message: Unable to generate a temporary class (result=1).\r\nerror CS1056: Unexpected character ''\r\nerror CS1040: Preprocessor directives must appear as the first non-whitespace character on a line\r\nerror CS0116: A namespace cannot directly contain members such as fields or methods\r\n
以上报错感觉和此处有关,但不知道如何查证
<setting name="CultureConfig" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>zh-CN</string>
<string>en-US</string>
<string>ko-KR</string>
</ArrayOfString>
</value>
</setting>
求助