}
if (addAssembliesInBin)
AddAssembliesInBin ();
+
+ foreach (NamespaceInfo info in PagesConfig.Namespaces) {
+ imports.Add (info.Namespace);
+ }
#else
foreach (string a in CompilationConfig.Assemblies)
AddAssemblyByName (a);
internal virtual Assembly AddAssemblyByFileName (string filename)
{
+ Assembly assembly = null;
+ Exception error = null;
+
try {
- Assembly assembly = Assembly.LoadFrom(filename);
- AddAssembly (assembly, true);
- return assembly;
- }
- catch (Exception e)
- {
- ThrowParseException ("Assembly file " + filename + " not found", e);
- return null; //never gets here, only to satisfy the compiler
- }
+ assembly = Assembly.LoadFrom (filename);
+ } catch (Exception e) { error = e; }
+
+ if (assembly == null)
+ ThrowParseException ("Assembly " + filename + " not found", error);
+
+ AddAssembly (assembly, true);
+ return assembly;
}
internal virtual Assembly AddAssemblyByName (string name)
// Add the code file as an option to the
// compiler. This lets both files be compiled at once.
- compilerOptions += " " + realPath;
+ compilerOptions += " \"" + realPath + "\"";
} else if (inherits != null) {
// We just set the inherits directly because this is a
// Single-Page model.