Friday, 18 May 2012

Anatomy of Console Application in C#

Step 1)  Create Console Application as shown below
Step 2) Following Directories and Files will be created.
       1)  Solution file: ConsoleApplication4.sln
       2) Project file ConsoleApplication4.csproj
          Directories 
                 1)Properties folder 
                       AssemblyInfo.cs --> contains meta data of the assembly, such as name,version,security etc.,
                 2) References
                       Microsoft.CSharp-> contains classes to support compilation & code generation
                       System  --> Core types ,base classes,interfaces,event handlers etc.,
                       System.Core -> collections,Io support,threading,security etc.,
                       System.Data --> database access support
                       System.Data.DataSetExtensions-> Dataset to LINQ support
                       System.Xml --> xml support
                       System.Xml.Linq --> xml to LINQ support
          FILES
                    program.cs
                   


Step 3)  Build the solution


Step 4) Go to application folder
  in this case : C:\Users\Administrator\Documents\visual studio 2010\Projects\ConsoleApplication4\ConsoleApplication4




After building  2 folders will be created
1) bin --> actual binaries store in this folder
2)obj --> supporting binaries are stored in this folder.

ConsoleApplication4.csproj  project file for this assembly
program.cs --> applictaion log file


Now go to BIN directory  , 1 or 2 folders will exists
  in this case  debug folder--> click on it



  1. It has  4 files  1.ConsoleApplication4.exe  --> actual binary file or MSIL code
  2. ConsoleApplication4.pdb  --> program database file
  3. ConsoleApplication4.vhost.exe --> clr host for the ConsoleApplictaion4.exe ,this is unmanaged application
  4. ConsoleApplication4.vhost.exe.manifest

No comments:

Post a Comment