Tuesday, 3 November 2009

Assembly resource URI format

I can never remember the URI format for resources embedded in assemblies.  So:

assembly://<assemblyname>/<namespace>/<resource>

The <namespace> part can include folder names separated from the base assembly namespace by dots (.). For example a Spring configuration file located in a SpringConfig folder for an application with a default namespace of Mail.Merge.Console would have a resource definition of:

assembly://Mail.Merge.Console/Mail.Merge.Console.SpringConfig/SpringDataAccess.xml