Skip to content

Commit

Permalink
+ Added log path to csharp loaded assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
trueromanus committed Sep 7, 2024
1 parent d6c7103 commit 44bfd76
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public Task<IEnumerable<AvailableMigration>> GetMigrationsAsync () {
foreach ( var file in m_files ) {
var loadContext = new AssemblyLoadContext ( "MigrationLoadContext" + Path.GetFileName ( file ) );
var fullPath = Path.GetFullPath ( file );
Console.WriteLine ( $"Try to load dll {fullPath}" );
var pathToAssembly = Path.GetDirectoryName ( fullPath ) ?? "";
loadContext.Resolving += ( AssemblyLoadContext context, AssemblyName assemblyName ) => {
return context.LoadFromAssemblyPath ( Path.Combine ( pathToAssembly, $"{assemblyName.Name}.dll" ) );
Expand Down

0 comments on commit 44bfd76

Please sign in to comment.