locked
how to create .exe file for 1 project having multiple class RRS feed

  • Question

  • I’m working on a test project where I had to write a script for automation using Selenium, Nunit Framework, C# in visual studio2017. I have written the script in that i created 1 class for each page and created a login class which is called in every class.Login class is inherited in every class. I want the project to be run outside visual studio bt creating a .bat file or .exe file for each class. When I create a .cs file of each class and try to compile it in command prompt it throws me namespace error as it can’t read Nunit, Openqa, etc. I will share some of the attachments.Please check.

    Wednesday, July 26, 2017 6:59 AM

All replies

  • Hi ananyasarkar,

    Thank you for posting in MSDN forum.

    This forum is discussing Visual Studio Setup and Installation, since your issue related to test, I help you move this case to test forum to get a better help.

    Thanks for your understanding

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 27, 2017 5:33 AM
  • Hi friend,

     

    >> When I create a .cs file of each class and try to compile it in command prompt it throws me namespace error as it can’t read Nunit, Openqa, etc.

     

    If you use vs command build, please refer to Command-line build with csc.exe:

    https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe

    What did the error message say if you got any?

    And you're welcome to post the sample code here.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, July 28, 2017 2:21 AM