I
I
Ilya1992018-06-29 18:44:07
C++ / C#
Ilya199, 2018-06-29 18:44:07

Where can be an error?

using System;

using System.Windows.Forms;

namespace App1
{
    class App
    {
        static void Main()
        {
            Console.WriteLine("Testing");

            MessageBox.Show("Hello, developer!");

            Console.ReadKey();
        }
    }
}

Compiling this code in visual studio 2017 - an error occurs, they say, a build error
Compiling the same code like this: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Roslyn\csc. exe" Program.cs - compiles and runs without any problems
I also noticed that when I entered in visual studio 2017 using System.Windows.Forms the word forms did not appear in the menu. Could this have something to do with it not compiling?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
LiptonOlolo, 2018-06-29
@Ilya199

Maybe because you have a console project, and the System.Windows.Forms library is not in it?

I
Ilya199, 2018-06-29
@Ilya199

By the way, this is not the first time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question