Use the C #2.0 command line compiler

Source: Internet
Author: User

Released on: 12/22/2004 | updated on: 12/22/2004
Andrew W. Troelsen, Microsoft MVP
Intertech Training
Abstract: This article analyzes the process of using the C # command line compiler csc.exe to generate an application. In addition, we will introduce many compiler options that are unique to C #2.0, such as extended/reference flag and strong name support. After reading this article, you can easily generate a single-file assembly and multi-file assembly in an environment without a wizard.
Applicable:
Microsoft Visual C #2.0
Note This article assumes that you are familiar with the C # programming language and. NET Framework Structure. It is helpful to try the command line tool.
Download the CSCSample. msi file.

Content on this page
Scsc.exe brings fun
C # compiler option Overview
Configure Environment Variables
Basic command line knowledge
Used to specify input and control output options
Compile the. NET code library
Use C # response File
Reference an external assembly using/reference
C #2.0 alias reference
Use/addmodule to generate multi-file assembly
Create a Windows form application
Use resources through csc.exe
Use/define to define Preprocessor symbols
Debug-centric options of csc.exe
Miscellaneous
Summary
Scsc.exe brings fun
Almost no one will deny the functionality provided by the integrated development environment (IDE) (for example, Visual Studio 2005 and Visual C # Express 2005) that makes programming quite simple. However, in fact, IDE itself generally does not provide access to all aspects of the basic compiler. For example, Visual Studio 2005 does not support multi-file assembly generation.
In addition, understanding the code compilation process in the command line may be useful to users with the following features:
& #8226; prefer the simplest method for generating. NET Framework applications.

& #8226; the secret to how IDE processes source code files.

& #8226; you want to use. NET to generate a utility, such as nant or msbuild.

& #8226; there is no integrated development environment, for example, Visual Studio (but actually has a free. NET Framework SDK ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.