Hope you are doing good! Thank you for reaching out. Please find the answer below.
- In your test code, during the test initialization phase, you can change the current directory to point to your WorkFolder.
[TestInitialize]
public void Init()
{
var workFolderPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,@"......\WorkFolder"); Directory.SetCurrentDirectory(Path.GetFullPath(workFolderPath));
This works because AppDomain.CurrentDomain.BaseDirectory usually points to the bin folder of your project, so navigating up with ...... will reach your project folder where WorkFolder resides.
- If you're still having issues, ensure that your test project references and paths are correctly set in the properties pane of your project. Sometimes, certain configurations or project setups can interfere with the expected paths.
- If you've already tried creating a RunSettings file but didn’t see how to specify the folder, make sure you're placing it where Visual Studio is set to look for it, and it correctly references the directory you want.
If issue still persist after following all the steps, We’ll be happy to assist further if needed." Kindly mark the answer as accepted if the issue resolved".