You know what I miss about the pre .Net days? Script! I liked creating a little script file to do little tasks for me, or to test a small piece of code without having to create a new project or solution. I like having one nice little file to deal with and clean up after, not a solution folder, a project folder and the resulting bin and obj folders. I long for those days, which is why I created Dot Net Script.
What is Dot Net Script? Basically, it's nothing more than a console application that reads an xml document from a .dnml file (Dot Net Markup Language.yea, I made this up). This xml document has sub-elements that hold information about assembly references, the language the code is written in, and the actual code to get compiled and executed. The console application, which I call the script engine, reads the xml text and parses out the required data. It then uses classes from the CSharp, VisualBasic, and CodeDom namespaces to compile the code and load the resulting assembly into memory. The script engine then uses reflection to execute the entry function in the generated assembly. When the user closes the console window, the script engine closes and the in-memory assembly goes out of scope and is cleaned up by the GC. No dlls or exes are ever created.
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks