How can I make a .exe executable from coded UI? RRS feed

  • Question

  • I only get a .dll. When I change the output type to windows application the code crash saying "filenotfoundexception was unhandled. but if I run the test in class application everything runs normally but I only get a .dll. 

    I know if I want to create a .exe file the output of my c# should be a "windows application" but also windows application requires .main file. I created a (.main) file and here is what I put in it. Before I write all that up my coded UI project name is tester1. 

    using tester1; 

    class testclass


         static void Main(string[] args){


             tester1.codeduitest1 loal_instance;

             local_instance = new codeduitest1();




    how can I fix this and create an executable? 

    Thursday, September 28, 2017 6:47 PM

All replies

  • >>I only get a .dll.

    Do you mean that you got .dll file after you running the coded ui test project?

    >>how can I fix this and create an executable? 

    If the project is Coded UI testing, it should generate .dll file, which could be executed via Mstest or VSTest. There is no .exe file generated.

    Please feel free to let me know if I misunderstood. 


    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

    • Edited by Fletch Zhou Friday, September 29, 2017 3:02 AM
    Friday, September 29, 2017 3:02 AM
  • You cannot convert a DLL to an EXE simply by changing the project type. In order to be an executable the code has to define an entry point. For a console application it would be the Main method.

    You cannot convert a coded UI test project to a console application. It doesn't even make sense. A coded UI test project is for testing an application. It consists of nothing more than a bunch of one-off methods that exercise an existing application. The code cannot be run standalone as it requires the test harness to be run (hence why it is a UI).

    If you want to run the UI tests in your DLL then you would run the coded UI test harness and provide your test DLL as input.

    Michael Taylor

    Friday, September 29, 2017 2:07 PM