在我的 AppDomain 中几乎没有动态程序集,当我尝试使用 codeDom.CompileAssemblyFromSource 编译另一个新程序集时,我无法找到将这些动态程序集添加到 ReferencedAssemblies 的方法。
foreach(AppDomain.CurrentDomain.GetAssemblies() 中的 var 程序集) { compilerParameters.ReferencedAssemblies.Add(assembly.Location); }
失败,因为动态程序集没有位置。
提前致谢。
PS:我实际上是在尝试在 IronPython 中使用 ASP.Net MVC 3 的新 Razor 模板引擎。