MessageBox
Every time I open a new project to a run program that contain MessageBox I have to add Reference using System.Windows.Forms;. I wish to know is there any way to make this permanent to all new project, that means no need to add Reference using System.Windows.Forms to new projects.
Posted Feb 8, 2012, 10:46 AM
VulpesPosted Feb 8, 2012, 9:41 AM
When you build from the command line, the compiler looks by default for a 'response' file called csc.rsp.
This contains a list of dlls, references to which are added automatically to your application unless you specify the compiler switch /noconfig.
The default response file contains System.Windows.Forms.dll amongst others which is why you don't need to add a reference to this particular dll when building a console application from the command line.
Although it's possibly to change this response file for command line builds, unfortunately it can't be used from Visual Studio. See:
http://msdn.microsoft.com/en-us/library/8a1fs1tb.aspx