Welcome Guest, you are in: Login

dbones docs

RSS RSS

Navigation (boxes)




Search the wiki
»

Debugging Issues

RSS
Modified on 2013/04/10 00:03 by Dave Categorized as Uncategorized

The Boxes framework aims to help the developer isolate issues quickly, here are some of the issues you may find.

My Package did not load

When you have ran the Discover and Load methods on the PackageRegistry and it did not throw any Errors. The main issue here is a missing dependency, which is very easy to find during development.
In the debugger you can easily see what Packages are missing dependencies


Image

You can drill into each package and it will list missing modules (these are the expected imported modules).


Image

Note: The Load method will only load Packages which are marked as CanLoad

MissingImportsException

This is similar to the “My package did not load”, in the sense the issue is caused by the same thing. The only reason you have an exception is normally due to your application trying to load a package directly when it is marked as CanLoad == false.


To solve read the exception, it should list the missing modules (dlls) and ensure the packages that export these are addressed.

MissingManifestException

When trying to Discover new packages it may throw this exception. The reason is due to a missing manifest file. Inside the exception it holds a reference to the Package in question, this will contain the location (helping you to quickly identify the Package).


Normally to solve this, ensure you include the manifest in your packages output.


Image



XmlManifestNotSupportedException

This is caused by one of two things

Missing default namespace in the manifest file
In the manifest file ensure you have include the default NS for example:


<manifest xmlns="http://schemas.dbones.co.uk/developer/boxes/2012">

Missing registration of an XmlManifestReader
The default PackageScanner includes the reader for Boxes.Core manifest file, however to provide support for other XmlManifestReader’s



//we want to support multiple manifest types. the default is XmlManifest2012Reader
var xmlManifestTask = new XmlManifestTask();
xmlManifestTask.AddXmlManifestReader(new XmlManifest2012Reader());
xmlManifestTask.AddXmlManifestReader(new XmlManifest2012ExtensionReader());

//setup the scanner. we can easily add extra tasks
var packageScanner = new PackageScanner(packageDirectory);
packageScanner.SetManifestTask(xmlManifestTask);
dbones docs, is a sub-site of dbones.co.uk, all its content belongs to dbones.co.uk, this also includes logo's.