Command Line Compile

  • Thread starter Thread starter Drew
  • Start date Start date
D

Drew

Hi,

Trying to learn how to compile C# from the Command line.

I've got my program running in Visual Studio, but I'm getting an error on
the command line:

The type or names space 'UserControl' could not be found (are you missing a
using directive or an assembly reference).

I assume I need to include something else?

How do I specify this?

Thank you!
 
Subash said:
What you need to specify depends on what is 'UserControl' in the current
context. If this is a namespace, you need to specify this as
namespace UserControl;

if this is a type in one of the namespaces, then you need to specify the
namespace (similar to the above) that contains this type.

Helps?

It helps a little, but I need the exact syntax to use on the command line.

In my case, I have a class that extends System.Windows.Forms.UserControl
and that is where the error is occuring.

Thanks,

Drew
 
Are you command line compiling on the same computer installed with Visual
Studio ( & the .NET framework)?
If not, perhaps it can't find the System.Windows.Forms.dll assembly which
contains System.Windows.Forms.UserControl.
I believe this is normally registered in the global assembly cache, unless
the .NET framework is not installed correctly?!?
 
Back
Top