Project Overview

XCST programs are called packages (not to be confused with NuGet packages). Packages are XML documents rooted at c:module or c:package.

The execution of a package consists of three separate processes: code generation, compilation and evaluation.

The code generation process takes an XCST package and produces C# source code. The resulting C# code consists of a single class that is a pure C# version of your XCST program.

The compilation process takes the C# source and produces a compiled package. This process is not implemented by this project, you have to invoke the C# compiler yourself, or use an IDE like Visual Studio. The C# code can be included in your existing project, see Code Generation: MSBuild.

The evaluation process takes an instance of your compiled package and produces a result document or object.

ASP.NET

Taking advantage of ASP.NET’s extensible build infrastructure, you can use XCST for web application development. The framework takes care of code generation and compilation at run-time. Compiled packages inherit a base class that provide access to HTTP objects, with properties like Request, Response, Context, Session, etc.

Additionally, you can use a set of extension instructions known as the application extension. These are based on the HTML helpers from ASP.NET MVC, and can greatly simplify the development of web forms.