Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. An issue with the file name SerialPortSettings.xml

An issue with the file name SerialPortSettings.xml

Scheduled Pinned Locked Moved WCF and WF
xmlhelpwpfquestiondiscussion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nick Alexeev
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • N Nick Alexeev

      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

      A Offline
      A Offline
      AksharRoop
      wrote on last edited by
      #2

      Don't know how your files are organized. There should not be any problem with SerialPortSettings.xml.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups