locked
Visual Studio 2012 - trying to deploy .runsettings file Result directory RRS feed

  • Question

  • I would like to access the path/file of the .runsettings files in my unit tests.

    Is there a way to do this?  I need to parse key information from it.

    thank you

    Joe

    • Moved by Fred Bao Tuesday, June 23, 2015 7:23 AM VS Test Related
    Monday, June 22, 2015 5:15 PM

Answers

  • Hi Joe,

    Thank you for posting in MSDN forum.

    As far as I know that if you want to call the .runsettings file during running the unit test from the Test Explorer in the Visual Studio 2012, you could go to Test menu, choose Test Settings, Select Test Settings File to enable the .runsettings file.

    For more information:

    https://msdn.microsoft.com/en-us/library/jj635153(v=vs.110).aspx

    However, if you want to call the runsettings file by running the unit test in command line. I suggest you will need to execute the /Settings command to call the .runsettings file using vstest.console.exe in command line.

    Reference:

    https://msdn.microsoft.com/en-us/library/vstudio/jj155796(v=vs.110).aspx

    Best Regards, 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Tina-Shi Wednesday, July 1, 2015 10:23 AM
    Wednesday, June 24, 2015 5:19 AM

All replies

  • Hello Joe,

    Since this issue is related with Unit Test, I move it to the Unit Test forum. The current forum you posted to is used to discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 23, 2015 7:23 AM
  • Hi Joe,

    Thank you for posting in MSDN forum.

    As far as I know that if you want to call the .runsettings file during running the unit test from the Test Explorer in the Visual Studio 2012, you could go to Test menu, choose Test Settings, Select Test Settings File to enable the .runsettings file.

    For more information:

    https://msdn.microsoft.com/en-us/library/jj635153(v=vs.110).aspx

    However, if you want to call the runsettings file by running the unit test in command line. I suggest you will need to execute the /Settings command to call the .runsettings file using vstest.console.exe in command line.

    Reference:

    https://msdn.microsoft.com/en-us/library/vstudio/jj155796(v=vs.110).aspx

    Best Regards, 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Tina-Shi Wednesday, July 1, 2015 10:23 AM
    Wednesday, June 24, 2015 5:19 AM