You can precompile trough desktop project too I give you example how you can compile trough webservice and desktop application Webserive :: on the service.cs [WebMethod] public int sum (int a , int b) { return a + b; } and now run the webservice on local host there you will see input textbox1 and input textbox 2 then invoke button you will see the result on xml page Compile trough desktop applicacion : public partial class Form1 : Form { applicationname.Service ws = new localhost.applicacionname.Service(); // this conect you to webservice but dont forget to add web reference (which display you when you will run the webservice) public Form1() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) // make button on your form and put three txtbox // { int a = int.Parse(textBox2.Text); int b = int.Parse(textBox3.Text); int result= ws.sum(a, b); textBox4.Text = result.ToString(); } Hope it will help you , good luck