devlife
devlife

Reputation: 16145

How to get an xml file when running mstest

I have a class which loads an xml file using the following:

Path.Combine( AppDomain.CurrentDomain.BaseDirectory, "Xml", documentName );

The documents that are being loaded are set to copy to the output directory. However, when I run mstest the xml file is not being copied to the BaseDirectory.

Does anyone have any idea how I can accomplish this?

Upvotes: 4

Views: 408

Answers (1)

devlife
devlife

Reputation: 16145

I believe I found the answer (as odd as it may be). By adding a testsettings document to the solution the AppDomain.CurrentDomain.BaseDirectory seems to be set currectly.

Upvotes: 1

Related Questions