Skip to content

Commit

Permalink
Update AddinManagerBase.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Apr 18, 2024
1 parent 32c23fa commit f79affd
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions AddInManager/Command/AddinManagerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,6 @@ public Result RunActiveCommand(ExternalCommandData data, ref string message, Ele
var alc = new AssemblyLoadContext(filePath);
try
{

// get list dependencies assembly at same folder
//var dependencies = alc.GetDependencies(filePath);
// List<AssemblyLoadContext> subAlcs = new List<AssemblyLoadContext>();
// foreach (var dependency in dependencies)
// {
// string subFilePath = Path.Combine(Path.GetDirectoryName(filePath), dependency + ".dll");
// var subAlc = new AssemblyLoadContext(subFilePath);
// if (!File.Exists(subFilePath)) continue;
// // load stream with security permission
// // var subStream = new FileStream(subFilePath, FileMode.Open, FileAccess.Read);
// subAlc.LoadFromAssemblyPath(subFilePath);
// // subStream.Close();
// subAlcs.Add(subAlc);
// }
var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
Assembly assembly = alc.LoadFromStream(stream);
object instance = assembly.CreateInstance(_activeCmdItem.FullClassName);
Expand Down

0 comments on commit f79affd

Please sign in to comment.