Instead of doing
```
assembly.GetTypes()
```
there should be a like of
```
foreach (var assemblyName in assembly.GetReferencedAssemblies()) {
// load types from assemblyName
}
```
That way you can simply reference assemblies with precompiled views and forget about the hassle.
Comments: Yes indeed, this method does load referenced assemblies eagerly. I meant to write CurrentAppDomain.GetAssemblies() instead, my bad :)
```
assembly.GetTypes()
```
there should be a like of
```
foreach (var assemblyName in assembly.GetReferencedAssemblies()) {
// load types from assemblyName
}
```
That way you can simply reference assemblies with precompiled views and forget about the hassle.
Comments: Yes indeed, this method does load referenced assemblies eagerly. I meant to write CurrentAppDomain.GetAssemblies() instead, my bad :)