Assembly.GetTypes () slower in post build event, but fast when debugging?

In one of our post-build events, we need to launch a small application that calls Assembly.GetTypes () for some of our assemblies.

The code looks like this (simplified):

var assembly = Assembly.LoadFrom(fis.FullName);
var allTypes = assembly.GetTypes();
...

      

When debugging this code, GetTypes () only takes milliseconds for each assembly. But when fired as a post build event, it takes about one minute for a specific build (but only on my PC, it works correctly on my colleagues' computers).

Do you have any idea what might be causing this? (Assembly.Load () / LoadFrom () / LoadFile () doesn't matter)

Thanks and best wishes, Maggi

+3


source to share





All Articles