An issue with the file name SerialPortSettings.xml
-
Colleagues, In XAML I’m trying to declare
XmlDataProvider
objects to bind controls to XML files.<XmlDataProvider x:Key="SerialPortOptions" Source="Settings/SerialPortOptions.xml" XPath="//Options" /> <!—- This one works. No complaints. -->
<XmlDataProvider x:Key="SerialPortSetting" Source="Settings/SerialPortSettings.xml" XPath="//SerialPorts" /> <!—- But this one gives an error. -->The second instance generates an error:
The file Settings/SerialPortSettings.xml is not part of the project or its 'Build Action' property is not set to 'Resource'.
The SerialPortSettings.xml file is added to the project and the Build Action is set to ‘Resource’. If I rename the file to SerialPortSettings_es_.xml, the error disappears. What’s special or unusual about the original file name SerialPortSettings.xml? Any thoughts, insight, references are appreciated! Cheers, - Nick
-
Colleagues, In XAML I’m trying to declare
XmlDataProvider
objects to bind controls to XML files.<XmlDataProvider x:Key="SerialPortOptions" Source="Settings/SerialPortOptions.xml" XPath="//Options" /> <!—- This one works. No complaints. -->
<XmlDataProvider x:Key="SerialPortSetting" Source="Settings/SerialPortSettings.xml" XPath="//SerialPorts" /> <!—- But this one gives an error. -->The second instance generates an error:
The file Settings/SerialPortSettings.xml is not part of the project or its 'Build Action' property is not set to 'Resource'.
The SerialPortSettings.xml file is added to the project and the Build Action is set to ‘Resource’. If I rename the file to SerialPortSettings_es_.xml, the error disappears. What’s special or unusual about the original file name SerialPortSettings.xml? Any thoughts, insight, references are appreciated! Cheers, - Nick
Don't know how your files are organized. There should not be any problem with SerialPortSettings.xml.