Doug

Doug

  • NA
  • 1
  • 0

Trying to load an xml document in my windows forms application

Mar 18 2009 4:40 PM
I've got a folder named "Configuration" in my windows form application. In that folder I have an xml file named "Exercises.xml". I'm trying to load this file into an XDocument with this line here: XDocument exerciseXML = XDocument.Load("~/Configuration/Exercise.xml"); When I test the program, I'm getting an error: Message="Could not find a part of the path 'C:\\VS2008_Projects\\ExerciseTracker\\ExerciseTracker\\bin\\Debug\\Configuration\\Exercise.xml'. How am I suppposed to reference the file in my load method??

Answers (1)