This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy



Download 21,46 Mb.
Pdf ko'rish
bet125/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   121   122   123   124   125   126   127   128   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

Programs ➤ Visual Studio 2008 ➤ Visual Studio Tools folder (see Figure 2-1).



Figure 2-1.

The Visual Studio 2008 command prompt

The benefit of using this particular command prompt is that it has been preconfigured to

provide access to each of the .NET development tools. Assuming you have a .NET development

environment installed, type the following command and press the Enter key:

csc -?

If all is well, you should see a list of command-line arguments of the C# command-line



compiler (where csc stands for the C-sharp compiler).

Building C# Applications Using csc.exe

While it is true that you may never decide to build a large-scale application using the C# command-

line compiler, it is important to understand the basics of how to compile your code files by hand. I

can think of a few reasons you should get a grip on the process:

• The most obvious reason is the simple fact that you might not have a copy of Visual Studio

2008.


• You may be in a university setting where you are prohibited from using code generation

tools/IDEs in the classroom.

• You plan to make use of automated build tools such as MSBuild or NAnt, which require you

to know the command-line options of the tools you are utilizing.

C H A P T E R   2  

B U I L D I N G   C #  A P P L I C AT I O N S



36

8849CH02.qxd  9/24/07  10:50 AM  Page 36




• You want to deepen your understanding of C#. When you use graphical IDEs to build appli-

cations, you are ultimately instructing csc.exe how to manipulate your C# input files. In this

light, it’s edifying to see what takes place behind the scenes.

Another nice by-product of working with csc.exe in the raw is that you become that much

more comfortable manipulating other command-line tools included with the .NET Framework 3.5

SDK. As you will see throughout this book, a number of important utilities are accessible only from

the command line. 

To illustrate how to build a .NET application IDE-free, we will build a simple executable assem-

bly named TestApp.exe using the C# command-line compiler and Notepad. First, you need some

source code. Open Notepad (using the Start ➤ Programs ➤ Accessories menu option) and enter the

following trivial C# code:


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   121   122   123   124   125   126   127   128   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish