How to get xml file when running mstest

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

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

Documents that are downloaded are set to copy to the output directory. However, when I run mstest, the xml file is not copied to BaseDirectory.

Does anyone know how I can do this?

+4
source share
1 answer

I believe that I found the answer (oddly enough). By adding the testettings document to the solution, AppDomain.CurrentDomain.BaseDirectory seems to be set correctly.

+1
source

Source: https://habr.com/ru/post/1304954/


All Articles