Developing an offer from @Inari
Just make sure you look at the AppDomain.CurrentDomain.DynamicDirectory folder with IncludeSubdirectories set to true. To be sure that you are not too late to track all the compilations, you need to run as the first, so I suggest you use PreApplicationStartMethodAttribute .
This helps in getting information when this process occurs. If you also want to find the source files, it depends on what interests you (only compiled assemblies? => Reflection, also compiled razor pages => by name).
[assembly: PreApplicationStartMethod(typeof(Demo.CompilationWatcher), "Initialize")] namespace Demo { public static class CompilationWatcher { public static void Initialize() { while (true) { FileSystemWatcher watcher = new FileSystemWatcher(); watcher.Path = AppDomain.CurrentDomain.DynamicDirectory; watcher.IncludeSubdirectories = true; watcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size; watcher.Filter = "*.*";
Aardvark71
source share