C# How to create own builder with stub.exe :  I have windowsform application with one textbox and one button1

and i have another console.application with source code like 

    console.writeline(textbox1.text);
    console.read();

I want to create somethings like when i will click on windowsform application button1
To compile my console application stub.exe