Specify Default Reference Assemblies for Command Line Compilation in .NET

For command-line compilation in .NET, you can reference other assemblies by using the /reference or /r option on the command line. But when you have to specify many assemblies, the list becomes too long. Because you have to specify these assemblies everytime you perform command-line compilation, it’s better to specify all your default reference assemblies at one time.

You can do this for C# in the csc.rsp file, and for VB.NET in the vbc.rsp file. You’ll find both files in the C:WINDOWSMicrosoft.NETFrameworkv2.0.50727 folder. The compiler processes all the assemblies you specify in this file for every compilation by the C# or VB.NET compiler, eliminating the need to specify that long list of assemblies at the command prompt.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: