views:

46

answers:

1

In my AppDomain there are few dynamic assembly, when I try codeDom.CompileAssemblyFromSource to Compile another new assembly, I can't figure out a way to add those dynamic assemble to ReferencedAssemblies.

foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
         compilerParameters.ReferencedAssemblies.Add(assembly.Location);
}

Failed, as dynamic assembly doesn't have Location.

Thanks in advance.

PS: I'm actually trying to use ASP.Net MVC 3's new Razor template engine in IronPython.

A: 

Not test, try use assembly.FullName instead of assembly.Location.

Shelvin
Thx, but FullName is:Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullso, failed.
Wuvist