The content solution is the top-level container in the content processing system. It defines four major items:
URI Resolver: The URI resolver is responsible for taking the URI’s used to reference content files and transforming them into locations on the local file system. By default, file system paths, UNC paths, and http/https URL’s are supported. If necessary, you can implement your own URL resolver in order to do something like interfacing with a source control provider. URI’s may be specified as absolute URI’s, or as relative URI’s. The location of the UriResolver DLL (and the specific class) used by the content processing system for all packages in the solution is specified in the solution file, and may be edited in the Solution Editor pane inside of Content Studio.
Content Targets: The content solution maintains a list of content target files. References to these files are stored relative to the content solution file so that the entire directory structure can be moved easily. Content targets will be described in more detail in future posts.
Content Packages: The content solution maintains a list of content package files. Like the content target files, these references are stored relative to the content solution file.
Schema References: The content solution maintains a list of references to XML schema files (*.xsd) that it uses to validate and process asset definition files. There is one schema file, FrameworkTypes.xsd, that defines the base framework types (AssetDefinition, etc.) This file is embedded in ContentPipeline.dll as an application resource. Any other schema files are defined by the user and are specific to their content pipeline.
The raw XML of a content solution file looks like this:
<?xml version="1.0"?>
<ContentSolution
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SolutionName="Test"
OutputPathName="Output"
UriResolver="XNATools.DefaultUriResolvers.BasicUriResolver">
<LocalSchemas>
<SchemaLocation>.\Schemas\AudioTypes.xsd</SchemaLocation>
</LocalSchemas>
<Targets>
<TargetDefinition>.\Targets\WINx86_DX9.cctgt</TargetDefinition>
</Targets>
<Packages>
<PackageDefinition>.\Packages\Level01.ccpkg</PackageDefinition>
</Packages>
<UriResolverAssemblyLocation>
.\Binaries\XNAToolsDefaultUriResolvers.dll
</UriResolverAssemblyLocation>
</ContentSolution>
When you create a new content solution in Content Studio, it creates the following directory structure for you (values in parentheses have user-configurable names):
Binaries: This folder will contain all DLL’s referenced by the content solution and its targets (except for unmanaged code DLL’s and DLL’s in the GAC.) This includes the UriResolver DLL, the packager DLL’s, and all content conditioner DLL’s (and any DLL’s they reference).
(Output): This folder contains the final output (usually package files) of the build process. The exact contents depends on the selected content packager implementations.
Packages: This folder contains all content package files (*.ccpkg), along with one subdirectory for each content package. These subdirectories contain the asset definition files associated with each package, along with the surrogate cache files (*.cache) used to reduce build times.
Schemas: Content Studio copies all referenced XML schema files (used to validate and process asset definition files) to this directory.
Targets: All content target files (*.cctgt) are placed in this directory.
(SolutionName).ccsln The content solution file (XML).
Next time, we’ll take a look at content targets and content packages.
This entry was posted on Sunday, July 12th, 2009 at 10:07 pm and is filed under Content Processing, Software Development. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.