I have a Test project, that has an xml file included. But when I run the test, it does not 'include' the file in the test project working directory, ala.. there is no Xml file available.
e.g:
I've added the Example.xml file to the project via "Add" > "Xml file", but I'm always getting FileNotFoundException... :/
Any advice on ensuring the file is included? No, I cannot use absolute paths. This test and project is run on many different machines.
EDIT: Already changed "Copy to output directory" as "Copy always"
e.g:
Code:
[TestClass]
public class MyTest
{
private testData = new XmlDocument();
[TestInitialize]
public void Initialize()
{
testData.Load("Example.xml"); //FileNotFoundException
}
}
I've added the Example.xml file to the project via "Add" > "Xml file", but I'm always getting FileNotFoundException... :/
Any advice on ensuring the file is included? No, I cannot use absolute paths. This test and project is run on many different machines.

EDIT: Already changed "Copy to output directory" as "Copy always"
Last edited: