The book says about a small Windows.Forms program
The Windows Forms classes are in the
System.Windows.Forms assembly, which
is the System.Windows.Forms.dll file.
To compile this program you need a
reference to that assembly.When compiling
on the command line, use the /r switch to specify other assemblies.
But I am able to compile this program from the command line(csc.exe) just fine, without having to reference to any assembly. why is this ?
cscdefaults to adding references to a bunch of assemblies. Have a look atcsc.rspin the same directory ascsc.exe(e.g. c:\Windows\Microsoft.NET\Framework\v3.5) to see what’s referenced by default.You can specify your own response file with an @ like this:
csc @responses.txt Foo.cs Bar.cs
(This isn’t useful very often, admittedly…)
You can also prevent the default response file from being used with the
/noconfigswitch.