I managed to compile my first non trivial (read “hello World”) C# application today. The lucky application was the opensource news reader Aggie. So how did I do it? Quite simply if truth be told.
Steps to compiling Aggie (or just download thefunctioning application)
- Get the source
- Put it somewhere
- Delete or move AggieCmd.cs (The command line source version)
- Run the compiler, C:>csc /out:aggie.exe /target:winexe *.cs
As a first taste in compilation not too bad (after a few false starts caused by not having compiled C sharp before).
Why not just download the thing? Because I would have missed out on all the hacking I’m going to do with it. Successfully compiling from source was just the first step on my road to C# mastery. One of the main false starts was that I wasn’t sure which files needed to be compiled, including the AggieCmd.cs file caused namespace conflicts when running the compilation (I imagine because it is a substitute for Aggie.cs) anyway a quick look at using the micrososft disassembly tool, IL DASM, showed me what was in both of the files and I quickly realised how the different source files fitted together.