Wiki

Clone wiki

SpringBreeze / Home

SpringBreeze

SpringBreeze is a tool for validating Spring.NET configuration files.

It is all too easy to introduce errors into the Spring.NET configuration, by making mispellings in object references and type names for example. Normally such errors are not revealed until the Spring.NET application is started and then only the first error is reported — this can lead to a frustrating run-fix cycle.

SpringBreeze can be used to validate the Spring.NET configuration files before starting the application and will report any errors it can find together in a list. This greatly reduces the the time to correct these files.

SpringBreeze can also be run as a post-build step to ensure breakages to your application's Spring.NET configuration files are detected early when they are easier to fix.

Usage

springbreeze Bin\Debug\MyApplication.exe.config Bin\Debug

Where 'MyApplication.exe.config' is the name of the application configuration file to check and 'Bin\Debug' is the directory containing the application assemblies — in this case the current directory.

If running as a post-build step, then the Visual Studio macros can be used:

"$(SolutionDir)Utils\SpringBreeze\SpringBreeze.exe" "$(TargetDir)MyApplication.exe.config" "$(TargetDir)."

Output

If SpringBreeze detects a problem then it will return with an error code and output its findings. The format of this output is as follows.

(             |)          
 ) p r i n g  |) r e e z e

Errors found:

    1. Spring object 'SomeObject' definition does not satisfy any of the constructors of type
'SomeNamespace.SomeType, SomeAssembly'. File './myapp.exe.config'.

(If SpringBreeze is included as a post-build step then look out for an error code of 10 and the SpringBreeze report in the build output.)

Features and Limitations

At present, SpringBreeze has the following features:

  • Checks objects declared in the main configuration file.
  • Checks external resource files.
  • Checks that object references are declared.
  • Checks that type names and their assemblies are valid.

At present, the following is not checked:

  • Constructor arguments / property intialisation.
  • Autowiring.
  • Types specified in type parameters.
  • Type aliases.

Updated