diff options
author | Marek Habersack <grendel@twistedcode.net> | 2006-11-27 22:24:29 +0300 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2006-11-27 22:24:29 +0300 |
commit | 31c50ab7aa778171d7e4dba0c846cb18ed09e14f (patch) | |
tree | 7a50f3fcb224c1f30d340b06e38f53ac46d3f2d3 /mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs | |
parent | 2e1e15c4426097d7265b6ca98f6c679004f0b349 (diff) |
App_Code assemblies fix
svn path=/trunk/mcs/; revision=68528
Diffstat (limited to 'mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs index 72b14133437..40f1b28dc22 100644 --- a/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs @@ -123,6 +123,9 @@ namespace System.Web.Compilation SimpleWebHandlerParser parser = compiler.Parser; CompilerParameters options = compiler.CompilerOptions; options.IncludeDebugInformation = parser.Debug; +#if NET_2_0 + GetExtraAssemblies (options); +#endif results = compiler.Compiler.CompileAssemblyFromFile (options, compiler.InputFile); string [] deps = (string []) parser.Dependencies.ToArray (typeof (string)); cache.InsertPrivate (key, results, new CacheDependency (deps)); @@ -143,7 +146,9 @@ namespace System.Web.Compilation foreach (string str in assemblies) coll.Add (str); } - +#if NET_2_0 + GetExtraAssemblies (options); +#endif return options; } @@ -225,6 +230,25 @@ namespace System.Web.Compilation return type; } +#if NET_2_0 + static void GetExtraAssemblies (CompilerParameters options) + { + ArrayList al = WebConfigurationManager.ExtraAssemblies; + if (al != null && al.Count > 0) { + foreach (object o in al) + if (o is string) + options.ReferencedAssemblies.Add ((string) o); + } + + IList list = BuildManager.CodeAssemblies; + if (list != null && list.Count > 0) { + foreach (object o in list) + if (o is string) + options.ReferencedAssemblies.Add ((string) o); + } + } +#endif + static bool AcquireCompilationTicket (string key, out object ticket) { lock (compilationTickets.SyncRoot) { |