How to test my programm

Hello i have a program with this code:

namespace WindowsFormsApp17
{
    public partial class Form1 : Form
    {
        TcpListener tcpListener = null;

        TcpClient tcpClient = null;

        TcpClient receive = null;

        int x = 0;

        public Form1()
        {
            InitializeComponent();

            tcpListener = TcpListener.Create(25);

            
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (tcpListener.Pending())
            {
                label1.Text = "Pending request detected!";


           receive =      tcpListener.AcceptTcpClient();

                label1.Text = "Connection request accepted";

                label2.Text = "Connected";

                x = Encoding.ASCII.GetByteCount("Hello google!");

               receive.GetStream().Write(Encoding.ASCII.GetBytes("Hello google!"), 0, Encoding.ASCII.GetByteCount("Hello google!"));

                timer1.Stop();
            }
            else
            {
                label1.Text = "Pending request not detected.Trying to detect...";
            }
           
        }

        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Start();

            tcpListener.Start();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            timer1.Stop();

            tcpListener.Stop();

          
        }

        private void button3_Click(object sender, EventArgs e)
        {
            try
            {

                tcpClient = new TcpClient("neWd190a", 25);

               


               

               

            }
            catch (Exception exc)
            {
                label1.Text = exc.Message;
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            byte[] data = new byte[10];

            tcpClient.GetStream().Read(data, 0, 10);

            label2.Text = Encoding.ASCII.GetString(data);
           
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            

            

          
           
        }

        private void button5_Click(object sender, EventArgs e)
        {
            tcpClient.GetStream().Write(Encoding.ASCII.GetBytes("Response"), 0, Encoding.ASCII.GetByteCount("Response"));
        }

        private void button6_Click(object sender, EventArgs e)
        {
            byte[] buffer = new byte[Encoding.ASCII.GetByteCount("Response")];

            receive.GetStream().Read(buffer, 0, Encoding.ASCII.GetByteCount("Response"));

            label3.Text = Encoding.ASCII.GetString(buffer);

        }
    }
}

Open in new window


How can I copy it to my dad's computer so I can check If it works(It works just fine for me :D).
LVL 1
Max DestinyAsked:
Who is Participating?
 
Éric MoreauSenior .Net ConsultantCommented:
You first need to build your project, then navigate to the bin folder located in your project folder and copy the files (mainly the .exe) to your dad's computer. If this other computer has the correct version of the .Net framework, it should just work.
0
 
Max DestinyAuthor Commented:
I tried it:)

It says that some files are missing so you need to communicate with the publisher of the app.

What is this supposed to mean?

Thank you for your help.
0
 
Éric MoreauSenior .Net ConsultantCommented:
I am confused. Comment has been accepted but it looks like you still have a question. What is the state of this question?

Any hints on the file that are missing? Which  version of the framework are you targeting in your project? And which version of the .Net framework is currently installed on your dad's computer? Do you have any references to other components that would also need to be deployed?
0
 
Max DestinyAuthor Commented:
no first I asked the question and then I re-read your comment and understood what I had to do so I closed the topic
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.