Thursday, October 29, 2009

Csharp programs compilation

1)
###############start:Compiling a program:start#####################################
csc C:\Gopi\DotNetPgms\HelloWorld.cs
################End:Compiling a library program:End#######################################

2)
###############start:Compiling a library program:start#####################################
csc /target:library /out:MathLibrary.DLL C:\Gopi\DotNetPgms\Add.cs C:\Gopi\DotNetPgms\Mult.cs
################End:Compiling a library program:End#######################################

3)

#################start:Compiling a program which has a dll reference:start###################################
csc /out:TestCode.exe /reference:MathLibrary.DLL C:\Gopi\DotNetPgms\TestCode.cs
################End:Compiling a nunit program:End#######################################

4)

#################start:Compiling a nunitprogram:start###################################
first generate the required dll
csc /target:library /out:bank.DLL C:\Gopi\DotNetPgms\bank.cs
write a nunit code.
add a reference(dll) of actual code,add reference of nunit.framework.dll and add nunit code
csc /target:library /out:accountbank.DLL /reference:nunit.framework.dll,bank.DLL C:\Gopi\DotNetPgms\Arithmetica.cs
################End:Compiling a nunit program:End#######################################

No comments:

Post a Comment